dotfiles

configuration files
git clone https://pi.duncano.de/git/dotfiles.git
Log | Files | Refs | README

commit 3f0093d7b54144834ad44252279cb0c8fb9f2232
parent 7f86cae80b81e3b4d4387c2e81673b3a41f4d748
Author: Duncaen <mail@duncano.de>
Date:   Sat, 28 Feb 2015 16:55:40 +0100

neocomplcache: add settings

Diffstat:
vim/settings/neocomplcache.vim | 38++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+), 0 deletions(-)

diff --git a/vim/settings/neocomplcache.vim b/vim/settings/neocomplcache.vim @@ -0,0 +1,38 @@ +let g:neocomplcache_enable_at_startup = 1 + +" Plugin key-mappings. +inoremap <expr><C-g> neocomplcache#undo_completion() +inoremap <expr><C-l> neocomplcache#complete_common_string() + +" Recommended key-mappings. +" <CR>: close popup and save indent. +inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR> +function! s:my_cr_function() + return neocomplcache#smart_close_popup() . "\<CR>" + " For no inserting <CR> key. + "return pumvisible() ? neocomplcache#close_popup() : "\<CR>" +endfunction +" <TAB>: completion. +inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" +" <C-h>, <BS>: close popup and delete backword char. +inoremap <expr><C-h> neocomplcache#smart_close_popup()."\<C-h>" +inoremap <expr><BS> neocomplcache#smart_close_popup()."\<C-h>" +inoremap <expr><C-y> neocomplcache#close_popup() +inoremap <expr><C-e> neocomplcache#cancel_popup() +" Close popup by <Space>. +"inoremap <expr><Space> pumvisible() ? neocomplcache#close_popup() : "\<Space>" + +" 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_force_omni_patterns') + let g:neocomplcache_force_omni_patterns = {} +endif +let g:neocomplcache_force_omni_patterns.php = '[^. \t]->\h\w*\|\h\w*::' +let g:neocomplcache_force_omni_patterns.c = '[^.[:digit:] *\t]\%(\.\|->\)' +let g:neocomplcache_force_omni_patterns.cpp = '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::'