From cf732d92d0442499002be581fceca4219d91b877 Mon Sep 17 00:00:00 2001 From: yan Date: Wed, 7 Dec 2011 13:35:25 -0800 Subject: [PATCH] Added neocomplcache plugin for automatic completion --- .gitmodules | 3 +++ vim/bundle/Shougo-neocomplcache | 1 + vimrc | 26 +++++++++++--------------- 3 files changed, 15 insertions(+), 15 deletions(-) create mode 160000 vim/bundle/Shougo-neocomplcache diff --git a/.gitmodules b/.gitmodules index 92524f4b..35d5357c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -94,3 +94,6 @@ [submodule "vim/bundle/skwp-vim-html-escape"] path = vim/bundle/skwp-vim-html-escape url = https://github.com/skwp/vim-html-escape +[submodule "vim/bundle/Shougo-neocomplcache"] + path = vim/bundle/Shougo-neocomplcache + url = https://github.com/Shougo/neocomplcache.git diff --git a/vim/bundle/Shougo-neocomplcache b/vim/bundle/Shougo-neocomplcache new file mode 160000 index 00000000..b2dc8412 --- /dev/null +++ b/vim/bundle/Shougo-neocomplcache @@ -0,0 +1 @@ +Subproject commit b2dc8412a431bd22305510770f7eeb8f0af59a80 diff --git a/vimrc b/vimrc index 43608f62..56c0295a 100644 --- a/vimrc +++ b/vimrc @@ -31,18 +31,6 @@ set noswapfile set nobackup set nowb -" Better omnicomplete options (use Ctrl-P, Ctrl-N or Tab) -if v:version >= 700 - set omnifunc=syntaxcomplete#Complete " override built-in C omnicomplete with C++ OmniCppComplete plugin - let OmniCpp_GlobalScopeSearch = 1 - let OmniCpp_DisplayMode = 1 - let OmniCpp_ShowScopeInAbbr = 0 "do not show namespace in pop-up - let OmniCpp_ShowPrototypeInAbbr = 1 "show prototype in pop-up - let OmniCpp_ShowAccess = 1 "show access in pop-up - let OmniCpp_SelectFirstItem = 1 "select first item in pop-up - set completeopt=menuone,menu,longest -endif - " persistent undos - undo after you re-open the file " but this gives warnings under command line vim " use only in macvim @@ -174,7 +162,8 @@ endfunction " Open the project tree and expose current file in the nerdtree with Ctrl-\ " the winfixwidth call ensures that nerdtree will not resize " if we create or remove other windows -nnoremap :NERDTreeFind:set winfixwidth +let g:NERDTreeWinSize = 30 +nnoremap :NERDTreeFind " move up/down quickly by using Ctrl-j, Ctrl-k " which will move us around by functions @@ -413,5 +402,12 @@ let g:ruby_conque_rspec_command='spec' let g:showmarks_include = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY" " Tell showmarks to stop using the '>' indicator for marks -let g:showmarks_textlower="\t" -let g:showmarks_textupper="\t" +let g:showmarks_textlower="\t>" +let g:showmarks_textupper="\t>" + +" neocomplcache +" A beter autocomplete system! +let g:neocomplcache_enable_at_startup = 1 +let g:neocomplcache_enable_camel_case_completion = 1 +let g:neocomplcache_enable_underbar_completion = 1 +let g:neocomplcache_min_syntax_length = 5