1

Using all of Vim, Xvim(for Xcode) and Ideavim(for IntelliJ), I'd like to be able to use the default keybindings while in insert mode rather than Vims. I've been using Xcode for quite some time now and have gotten quite good at typing with the standard Xcode bindings but Vim bindings are so much better while not in insert mode.

I know you can do .vimrc settings such as

:im <C-D> <esc>xa

to emulate these functions, but this still leaves problems with slightly different behaviors as well as losing functionality where these commands have multiple uses. IE ctrl+n is both down while typing and next while scrolling through autocompletions. Custom bindings in .vimrc removes the ability to scroll through autocompletions.

Using

:im <C-N> <NOP>

enables scrolling through autocompletions but still doesn't let it function as down.

Anybody know how to solve this?

lanza
  • 1,512
  • 2
  • 13
  • 26
  • What Keymap do you have selected? Mine is a custom keymap which is "Based on keymap: Mac OS X 10.5+", and I am able to use ctrl-n as you describe (down while typing and next in an autocompletion list in insert mode). I don't have any custom bindings for ctrl-n in my ~/.ideavimrc or IDEA keymap. – jbyler Jun 15 '16 at 17:49

1 Answers1

0

If you really want to, you can put

nnoremap i :action VimPluginToggle<CR>

into your ~/.ideavimrc, then in Preferences => Keymap, find the Vim Emulator item and assign the shortcut ESC to it. This when instead of entering insert mode, you'll be disabling IdeaVim, and hitting ESC will re-enable it.

I tested this briefly and it does seem to work at least at a superficial level, although you lose the changing caret style as an indicator of which mode you're in. I'm not sure that's a good idea, however. Probably better to work within the system as designed and set up the bindings you want.

jbyler
  • 7,200
  • 3
  • 34
  • 42