프로그래밍

vim 자동완성 스크립트

Widyou 2008. 10. 9. 12:57
http://www.vim.org/scripts/script.php?script_id=1879

~/.vim/plugin/ 에 다운받은 autocomplpop.vim를 넣는다

~/.vimrc 에 아래 내용을 붙여넣는다.(없으면 새로만든다)
function! InsertTabWrapper()
  let col = col('.') - 1
  if !col || getline('.')[col-1]!~'\k'
    return "\<TAB>"
  else
    if pumvisible()
      return "\<C-N>"
    else
      return "\<C-N>\<C-P>"
    end
  endif
endfunction

출처 및 참고: http://monac.egloos.com/1936134