How to configure in IdeaVIM Ctrl + N and Ctrl + P completion from Vim?

前端 未结 6 1535
栀梦
栀梦 2021-01-31 08:42

In Vim we can use Ctrl + N or Ctrl + P to finish code completion. How to configure it in IdeaVim for IntelliJ?

6条回答
  •  闹比i
    闹比i (楼主)
    2021-01-31 08:44

    This is the way I found to make the word completion work with CTRL-N and CTRL-P, while still having the shortcuts work for DOWN and UP in lists.

    In Settings -> Keymap, map CTRL-N and CTRL-P to Down and Up respectively. Then, in the Other Settings -> Vim Emulation, set CTRL-N and CTRL-P handlers to Vim.

    Finally, add the following to your .ideavimrc

    imap  :action HippieCompletiona
    imap  :action HippieBackwardCompletiona
    

提交回复
热议问题