How change short keys in Vim?

Tarek Saied picture Tarek Saied · Jan 2, 2011 · Viewed 8.5k times · Source

I am a new user in Vim. How change these keys in Zen Coding,

ctr+y+,

To

ctr+e


And also change in omni,

ctr+x ctr+o

To

ctr+j

How can I do that?

Answer

eolo999 picture eolo999 · Jan 2, 2011

I suggest you to type:

:help map.txt

inside vim, you'll find all the explanation to understand how to do it.

You can't use the same shortcut for 'zencoding' plugin and for an omnicomplete function; anyway you could add to your .vimrc:

imap <C-j> <C-y>

But I suggest not to use 'C-j' as 'j' is always related to movement in vim; use 'leader' (:help leader) which is targeted to user shortcuts, instead.