From 9fc329f1866df852b760fcf7c46a00324bc824d4 Mon Sep 17 00:00:00 2001 From: Ellis Berner Date: Thu, 19 Dec 2013 10:42:44 -0800 Subject: [PATCH] Initial crack at neocomplete --- vim/settings/neocomplcache.vim | 42 ---------------------------- vim/settings/neocomplete.vim | 50 ++++++++++++++++++++++++++++++++++ vim/vundles.vim | 2 +- 3 files changed, 51 insertions(+), 43 deletions(-) delete mode 100644 vim/settings/neocomplcache.vim create mode 100644 vim/settings/neocomplete.vim diff --git a/vim/settings/neocomplcache.vim b/vim/settings/neocomplcache.vim deleted file mode 100644 index 51800df..0000000 --- a/vim/settings/neocomplcache.vim +++ /dev/null @@ -1,42 +0,0 @@ -" 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_enable_smart_case = 1 - -" default # of completions is 100, that's crazy -let g:neocomplcache_max_list = 5 - -" words less than 3 letters long aren't worth completing -let g:neocomplcache_auto_completion_start_length = 3 - -" Map standard Ctrl-N completion to Cmd-Space -inoremap - -" This makes sure we use neocomplcache completefunc instead of -" the one in rails.vim, otherwise this plugin will crap out -let g:neocomplcache_force_overwrite_completefunc = 1 - -" Define keyword. -if !exists('g:neocomplcache_keyword_patterns') - let g:neocomplcache_keyword_patterns = {} -endif -let g:neocomplcache_keyword_patterns['default'] = '\h\w*' - -" Enable omni completion. -autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS -autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags -autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS -autocmd FileType python setlocal omnifunc=pythoncomplete#Complete -autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags -autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete -" Enable heavy omni completion. -if !exists('g:neocomplcache_omni_patterns') - let g:neocomplcache_omni_patterns = {} -endif -let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::' - -" Prevent hanging with python: https://github.com/skwp/dotfiles/issues/163 -let g:neocomplcache_omni_patterns['python'] = '' diff --git a/vim/settings/neocomplete.vim b/vim/settings/neocomplete.vim new file mode 100644 index 0000000..c2508ea --- /dev/null +++ b/vim/settings/neocomplete.vim @@ -0,0 +1,50 @@ +" Disable AutoComplPop. +let g:acp_enableAtStartup = 0 +" Use neocomplcache. +let g:neocomplcache_enable_at_startup = 1 +" Use smartcase. +let g:neocomplcache_enable_smart_case = 1 +" Set minimum syntax keyword length. +let g:neocomplcache_min_syntax_length = 3 +let g:neocomplcache_lock_buffer_name_pattern = '\*ku\*' + +" Enable heavy features. +" Use camel case completion. +"let g:neocomplcache_enable_camel_case_completion = 1 +" Use underbar completion. +"let g:neocomplcache_enable_underbar_completion = 1 + +" Define dictionary. +let g:neocomplcache_dictionary_filetype_lists = { + \ 'default' : '', + \ 'vimshell' : $HOME.'/.vimshell_hist', + \ 'scheme' : $HOME.'/.gosh_completions' + \ } + +" Define keyword. +if !exists('g:neocomplcache_keyword_patterns') + let g:neocomplcache_keyword_patterns = {} +endif +let g:neocomplcache_keyword_patterns['default'] = '\h\w*' + +" Map standard Ctrl-N completion to Cmd-Space +inoremap + +" Enable omni completion. +autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS +autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags +autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS +autocmd FileType python setlocal omnifunc=pythoncomplete#Complete +autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags + +" Enable heavy omni completion. +if !exists('g:neocomplcache_omni_patterns') + let g:neocomplcache_omni_patterns = {} +endif +let g:neocomplcache_omni_patterns.php = '[^. \t]->\h\w*\|\h\w*::' +let g:neocomplcache_omni_patterns.c = '[^.[:digit:] *\t]\%(\.\|->\)' +let g:neocomplcache_omni_patterns.cpp = '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::' + +" For perlomni.vim setting. +" https://github.com/c9s/perlomni.vim +let g:neocomplcache_omni_patterns.perl = '\h\w*->\h\w*\|\h\w*::' diff --git a/vim/vundles.vim b/vim/vundles.vim index fe03c70..f4b3524 100644 --- a/vim/vundles.vim +++ b/vim/vundles.vim @@ -60,7 +60,7 @@ Bundle "tpope/vim-git" " General text editing improvements... Bundle "AndrewRadev/splitjoin.vim" Bundle "Raimondi/delimitMate" -Bundle "Shougo/neocomplcache.git" +Bundle "Shougo/neocomplete.git" Bundle "briandoll/change-inside-surroundings.vim.git" Bundle "godlygeek/tabular" Bundle "nelstrom/vim-visual-star-search"