http://www.vim.org/scripts/script.php?script_id=1879
~/.vim/plugin 에 넣어주고
~/.vimrc 에
function! InsertTabWrapper()
let col = col(‘.’) – 1
if !col || getline(‘.’)[col-1]!~’\k’
return “\<TAB>”
else
if pumvisible()
return “\<C-P>”
else
return “\<C-N>\<C-P>”
end
endif
endfunction
inoremap <tab> <c-r>=InsertTabWrapper()<cr>
inoremap <expr> <CR> pumvisible() ? “<C-Y><CR>” : “<CR>”
hi Pmenu ctermbg=blue
hi PmenuSel ctermbg=yellow ctermfg=black
hi PmenuSbar ctermbg=blue
추가 염 “