When using vim, if you need to automatically complete a word, you need to press <Ctrl+p> or <Ctrl + n>. At this time, a completion drop-down list will appear. How to configure vimrc to make the drop-down list automatically Appear? That is, a completion drop-down list automatically appears when typing?
为情所困2017-05-16 16:39:11
Plug-in address: http://www.vim.org/scripts/script.php?sc...
After downloading, just put it in the .vim/plugin directory.
The following two options can be configured to adjust the default behavior of SuperTab:
g: The value of SuperTabRetainCompletionType defaults to 1, which means to remember your last completion method until you use other completion commands to change it; if it is set to 2, it means to remember the last completion method. , until ESC is pressed to exit insert mode; if set to 0, it means that the last completion method is not recorded.
g: The value of SuperTabDefaultCompletionType sets the default completion method, and the default is CTRL-P.
You can set these two variables in vimrc, for example:
let g:SuperTabRetainCompletionType = 2
let g:SuperTabDefaultCompletionType = "<C-X><C-O>"
Now you can use TAB for completion, just like in the shell, which is a lot more convenient!
过去多啦不再A梦2017-05-16 16:39:11
Recommend Youcompleteme: https://github.com/Valloric/YouCompleteM...
If you are a front-end, you can take a look at my configuration: https://github.com/ruanyl/bigvim
高洛峰2017-05-16 16:39:11
Supplement: If it is Python (mainly writing Python, few others), you can use jedi-vim
仅有的幸福2017-05-16 16:39:11
There is a plug-in called AutoComplPop, which can be found on github.