I just installed Emmet VIM plugin which looks very interesting. The "trigger key combination" to activate the Emmet plugin functionality is not the best it could be. Therefore I am trying to remap it in my vimrc file. I have successfully done that to remap the Escape key as follows:
inoremap ;; <ESC>
This allows me to type the semi-colon character ";" in rapid succession to get out of the insert mode and get in the normal mode. However it does not work when I try to remap the Emmet trigger key which is , (to be read as Control key and "y" key, followed by the "," key). I have tried the following combinations:
inoremap hh <C-y> ,
inoremap hh <C-y>,
inoremap hh <C-y,>
As you can see above, I am trying to map "hh" key combination to the Emmet VIM's trigger keys.
Thanks in advance for your time.
Bharat
inoremap
means that if there is a mapping (such as to ,
) it will not be followed via the key combination for the mapping. You probably want imap
imap hh <C-y>,
I use that:
let g:user_emmet_leader_key=','
So ',,' triggers Emmet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With