Forked from h1mesuke/neocomplcache_settings.vim
Created
March 22, 2013 03:12
This file contains hidden or 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 | |
" http://github.com/Shougo/neocomplcache | |
let g:neocomplcache_enable_at_startup = 1 | |
let g:neocomplcache_max_list = 100 | |
let g:neocomplcache_max_keyword_width = 50 | |
let g:neocomplcache_max_filename_width = 15 | |
let g:neocomplcache_auto_completion_start_length = 2 | |
let g:neocomplcache_manual_completion_start_length = 2 | |
let g:neocomplcache_min_keyword_length = 3 | |
let g:neocomplcache_min_syntax_length = 3 | |
let g:neocomplcache_enable_ignore_case = 1 | |
let g:neocomplcache_enable_smart_case = 1 | |
let g:neocomplcache_disable_auto_complete = 0 | |
let g:neocomplcache_enable_wildcard = 1 | |
let g:neocomplcache_enable_quick_match = 0 | |
let g:neocomplcache_enable_auto_select = 0 | |
let g:neocomplcache_enable_auto_delimiter = 0 | |
let g:neocomplcache_enable_camel_case_completion = 1 | |
let g:neocomplcache_enable_underbar_completion = 1 | |
let g:neocomplcache_enable_caching_message = 1 | |
if !exists('g:neocomplcache_same_filetype_lists') | |
let g:neocomplcache_same_filetype_lists = {} | |
endif | |
let g:neocomplcache_same_filetype_lists.html = 'css' | |
let g:neocomplcache_same_filetype_lists.xhtml = 'html' | |
let g:neocomplcache_same_filetype_lists.zsh = 'sh' | |
if !exists('g:neocomplcache_filetype_include_lists') | |
let g:neocomplcache_filetype_include_lists= {} | |
endif | |
"let g:neocomplcache_filetype_include_lists.perl6 = [{'filetype' : 'pir', 'start' : 'Q:PIR\s*{', 'end' : '}'}] | |
"let g:neocomplcache_filetype_include_lists.vim = | |
" \[{'filetype' : 'python', 'start' : '^\s*python <<\s*\(\h\w*\)', 'end' : '^\1'}] | |
let g:neocomplcache_plugin_disable = { 'tags_complete': 1 } | |
if !exists('g:neocomplcache_plugin_rank') | |
let g:neocomplcache_plugin_rank = {} | |
endif | |
let g:neocomplcache_plugin_rank.buffer_complete = 10 | |
"--------------------------------------- | |
" Keymaps | |
nnoremap <silent> <Space>ne :<C-u>NeoComplCacheCachingBuffer<CR>:echo "Caching done."<CR> | |
imap <expr> <C-x> <SID>neocom_cancel_popup_and('<C-x>') | |
imap <expr> <CR> <SID>neocom_close_popup_and('<CR>') | |
function! s:neocom_cancel_popup_and(key) | |
if pumvisible() && exists('*neocomplcache#cancel_popup') | |
return neocomplcache#cancel_popup() . a:key | |
else | |
return a:key | |
endif | |
endfunction | |
function! s:neocom_close_popup_and(key) | |
if pumvisible() && exists('*neocomplcache#close_popup') | |
return neocomplcache#close_popup() . a:key | |
else | |
return a:key | |
endif | |
endfunction | |
"--------------------------------------- | |
" Snippets | |
let g:neocomplcache_snippets_dir = $VIM_DIR.'/snippets' | |
let g:neocomplcache_disable_select_mode_mappings = 1 | |
imap <silent> <C-j> <Plug>(neocomplcache_snippets_expand) | |
imap <silent> <C-k> <Plug>(neocomplcache_snippets_jump) | |
augroup MyNeocomSnips | |
autocmd! | |
autocmd BufEnter * call <SID>neocom_smap_init() | |
autocmd BufWritePre *.snip call <SID>neocom_snip_entab() | |
augroup END | |
function! s:neocom_smap_init() | |
smapclear | |
smapclear <buffer> | |
smap <silent> <C-j> <C-c>aa<BS><Plug>(neocomplcache_snippets_jump) | |
snoremap <Esc> <C-c> | |
endfunction | |
function! s:neocom_snip_entab() | |
setlocal noexpandtab | |
retab! | |
execute 'setlocal sw='.&l:shiftwidth.' ts='.&l:tabstop | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment