Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have jj mapped to exit from insert mode and save the file. This trick was found in a long SO thread, plus I never had the need to type something with a double j ;)


I have the even faster jk mapped to ESC. And if you want to type jk in your text you just have to

- type j - wait 1 second - type k.


Very nice!

For those wondering how to do this, you can try it out with

:imap jk <esc>

(imap means "use this mapping when I'm in insert mode".)

If you like it, add everything but the : to your .vimrc


I find kj easier to type, since it's an outward muscle movement.

Warning: If you do this you will wind up typing those characters by memory nearly everywhere.kj




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: