bbuser
bbuser

Reputation: 928

Is there a vim plugin for eclipse that let me remap jj to Esc?

I am looking for an eclipse plugin that gives me basic vim commands.

I don't expect to much but I'm so used to 'jj' for escape that this feature is essential for me. 'jj' should work like in vim: Leave insert mode but don't insert any characters.

I'm considering

but didn't find much information if it is possible to remap anything to ESC.

With viplugin it seems possible to do that, but when remapping 'jj' it still inserts 'jj'. Eclim should support it, but it's probably to heavy.

Upvotes: 5

Views: 1512

Answers (2)

Drew Bell
Drew Bell

Reputation: 21

What worked for me:

  1. Make sure your .vrapperrc is in what Eclipse has as your user director. A quick google gave this:

"If you go to Help > About > Installation Details > Configuration tab, can you check if the directory listed next to user.home is the one your .vrapperrc is in?"

  1. Add this line to the .vrapperrc:

imap jj <ESC>

'inoremap' didn't seem to work for me, but that might have been because of some other issue.

  1. Restart Eclipse and profit.

Upvotes: 2

romainl
romainl

Reputation: 196751

You can customize vrapper's behaviour with a vimrc-like file: ~/.vrapperrc. It works like ~/.vimrc syntax-wise but you are quite limited in what you can put there.

inoremap jj <ESC>

does exactly what you want, though, just like in Vim.

Upvotes: 10

Related Questions