Hacker Newsnew | past | comments | ask | show | jobs | submit | securitybear's commentslogin

What's your point? Please elaborate!


Now that 'Escape' is not a real hardware key in the new Macbook Pro anymore and even otherwise 'Escape' has always been one of the hard to reach keys, what is workaround for avoiding the 'Escape' key in Vim?


Caps Lock is the original placement of the Esc key. It's much more useful having Esc on your home row.


some people use Shift Lock (which is barely used, and closer to pinky), and a colleague of mine use the sequence 'ii'


Did you mean Caps Lock? Which tool do you use? I found https://github.com/susam/uncap but it does not have a MacOS binary.


You don't need any external program. Open System Preferences, go to Keyboard and click on "Modifiers Keys...", then you can map Caps Lock to Esc.


i map <tab> <esc>, which is much easier to reach. Thanks to autoindent the TAB key is useless inside vim.


people often map `jk` or `jj`, or the key to the left of `1` to Esc. I use `jk`.


I tried the idea of using `jk` in the past and found that it surely cannot be a perfect replacement of Escape.

Say I perform these mappings:

  :noremap jk <Esc>
  :inoremap jk <Esc>
Now granted, pressing `jk` in insert mode escapes me to normal mode. But many use cases that work with the Escape key do not work with `jk` anymore.

For example, try:

  :ab hn Hacker News
Now type `hn` in insert mode and press Escape, it would expand to `Hacker News` like it should. But then type `hn` in insert mode and press `jk`, it does not expand to `Hacker News`.


I use ctrl+[ myself.


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

Search: