3

I am now really used to send escape to Vim in my terminals using the Alt(Meta) key + a movement (like 'j'). Using any "Vim plugin" in IDEs becomes a pain, because they usually do not forward the alt keypress to the emulator plugin.
For example, I cannot obtain this behavior in IdeaVim.

I tried to :map <A-j> <Esc><j>, and also to edit the keymaps for IdeaVim in File->Settings without any success.

Does someone know if this is possible ?

Ad N
  • 7,930
  • 6
  • 36
  • 80
  • If you are on OSX you may want to check [this](http://stackoverflow.com/a/15399297/1027527). – dev May 28 '14 at 20:41

3 Answers3

2

As of IdeaVim 0.33 (released 2014-04-28), key mappings in ~/.vimrc are now supported.

Release announcement

VIM-288

(Note: This question could probably be considered a duplicate of this other StackOverflow question.)

Community
  • 1
  • 1
jbyler
  • 7,200
  • 3
  • 34
  • 42
1

:map, :vmap, and the like are not currrently supported by IdeaVim. However you can vote for them to be implemented in the IdeaVim Bugtracker.

If you want this behaviour now you could use AutoHotKey and the following line:

; Remap <A-j> to <Esc><j>
!j::Send {Escape}{j}

Note that this will remap the keys everywhere not just in vim

Brett Y
  • 7,171
  • 1
  • 28
  • 42
1

ideavim Mappings are only supported at a very basical level. Like map j h. I tried mapping jj to and it didn't work myself, awhile ago. It seems the multi-letter keystrokes don't work in insert mode. Which kind of makes sense as this is emulating vim, and it has to go through, and abide by the key event API of a CUA.

Zombies
  • 25,039
  • 43
  • 140
  • 225