forked from suztomo/dotfiles
/
.vimrc.completion
34 lines (30 loc) · 1.09 KB
/
.vimrc.completion
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"-------------------------------------------------------------------------------
" 補完・履歴 Complete
"-------------------------------------------------------------------------------
set wildmenu " コマンド補完を強化
set wildchar=<tab> " コマンド補完を開始するキー
set wildmode=list:full " リスト表示,最長マッチ
set history=1000 " コマンド・検索パターンの履歴数
set complete+=k " 補完に辞書ファイル追加
" Ex-modeでの<C-p><C-n>をzshのヒストリ補完っぽくする
cnoremap <C-p> <Up>
cnoremap <Up> <C-p>
cnoremap <C-n> <Down>
cnoremap <Down> <C-n>
"<c-space>でomni補完
" imap <c-space> <c-x><c-o>
" " -- tabでオムニ補完
" function! InsertTabWrapper()
" if pumvisible()
" return "\<c-n>"
" endif
" let col = col('.') - 1
" if !col || getline('.')[col -1] !~ '\k\|<\|/'
" return "\<tab>"
" elseif exists('&omnifunc') && &omnifunc == ''
" return "\<c-n>"
" else
" return "\<c-x>\<c-o>"
" endif
" endfunction
" inoremap <tab> <c-r>=InsertTabWrapper()<cr>