search

Home  >  Q&A  >  body text

vimrc - How to make vim automatically display a completion drop-down list?

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?

仅有的幸福仅有的幸福2775 days ago943

reply all(5)I'll reply

  • 为情所困

    为情所困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!

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-05-16 16:39:11

    Recommended spf13-vim, one-click installation, super configuration.

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再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

    reply
    0
  • 高洛峰

    高洛峰2017-05-16 16:39:11

    Supplement: If it is Python (mainly writing Python, few others), you can use jedi-vim

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-05-16 16:39:11

    There is a plug-in called AutoComplPop, which can be found on github.

    reply
    0
  • Cancelreply