Created
June 5, 2012 15:06
-
-
Save heavenshell/2875547 to your computer and use it in GitHub Desktop.
neocon_vimrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Neocomplcache {{{ | |
" Disable AutoComplPop. | |
let g:acp_enableAtStartup = 0 | |
" Use neocomplcache. | |
let g:neocomplcache_enable_at_startup = 1 | |
" Use smartcase. | |
let g:neocomplcache_enable_ignore_case = 0 | |
let g:neocomplcache_enable_smart_case = 1 | |
" Complete list order:Buffer, Dictionay | |
let g:neocomplcache_plugin_rank = {} | |
let g:neocomplcache_plugin_rank.buffer_complete = 90 | |
" Use camel case completion. | |
let g:neocomplcache_enable_camel_case_completion = 1 | |
" Use underbar completion. | |
let g:neocomplcache_enable_underbar_completion = 1 | |
" Set minimum syntax keyword length. | |
let g:neocomplcache_min_syntax_length = 3 | |
let g:neocomplcache_lock_buffer_name_pattern = '\*ku\*' | |
" Define dictionary. | |
let g:neocomplcache_dictionary_filetype_lists = { | |
\ 'default': '', | |
\ 'php': $HOME . '/.vim/dict/php.dict', | |
\ 'python': $HOME . '/.vim/dict/python/complete-dict' | |
\ } | |
let g:neocomplcache_enable_auto_select = 1 | |
if !exists('g:neocomplcache_keyword_patterns') | |
let g:neocomplcache_keyword_patterns = {} | |
endif | |
let g:neocomplcache_keyword_patterns['default'] = '\h\w*' | |
" Recommended key-mappings. | |
" <CR>: close popup and save indent. | |
"inoremap <expr><CR> neocomplcache#smart_close_popup() . "\<CR>" | |
" <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() | |
" Enable omni completion. | |
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete | |
autocmd FileType php setlocal omnifunc=phpcomplete#CompletePHP | |
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS | |
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS | |
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags | |
autocmd FileType htmljinja setlocal omnifunc=htmlcomplete#CompleteTags | |
autocmd FileType java setlocal omnifunc=javacomplete#Complete | |
" 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*::' | |
" }}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment