How do you automatically remove the preview window after autocompletion in Vim?

前端 未结 7 711
执笔经年
执笔经年 2021-01-29 18:05

I\'m using omnifunc=pythoncomplete. When autocompleting a word (e.g., os.), I get the list of eligible class members and functions, as

7条回答
  •  无人共我
    2021-01-29 18:39

    Put the following in your vimrc:

    " If you prefer the Omni-Completion tip window to close when a selection is
    " made, these lines close it on movement in insert mode or when leaving
    " insert mode
    autocmd CursorMovedI * if pumvisible() == 0|pclose|endif
    autocmd InsertLeave * if pumvisible() == 0|pclose|endif
    

提交回复
热议问题