Re:Vim: Spacebar as leader key, CapsLock as Esc
by jagger27 on Monday December 16, 2013 @12:59PM
(#6916481)
What is a leader key? How much typing class did I miss?!
[ Parent
| on HN ]
Re:Vim: Spacebar as leader key, CapsLock as Esc
by ryanthejuggler on Monday December 16, 2013 @01:07PM
(#6916543)
I think he means instead of using a colon to begin Vim commands, he begins by typing a space.
I started using Caps Lock as an extra Ctrl a couple months ago. It's great, except now I can't use other people's computers because I end up in caps-lock shout mode.
E.g. instead of "ctrl+l" in my browser to visit a site, it ends up:
CTRL+SHOUT+L BROWSER TAKE ME TO FACEBOOK I COMMAND THEE
Re:Vim: Spacebar as leader key, CapsLock as Esc
by publicfig on Monday December 16, 2013 @02:46PM
(#6917317)
Leader is actually a different key than the colon in Vim. Here's a nice description of it: http://learnvimscriptthehardway.stevelosh.com/chapters/06.ht...
Re:Vim: Spacebar as leader key, CapsLock as Esc
by ChronosKey on Monday December 16, 2013 @02:51PM
(#6917347)
colon is used to enter Ex mode. Leader is a separate key (used as an extra modifier like the Meta key in Emacs) http://stackoverflow.com/questions/1764263/what-is-the-leade...
Re:Vim: Spacebar as leader key, CapsLock as Esc
by normalocity on Monday December 16, 2013 @01:26PM
(#6916708)
lol - yeah, I have the same problem. I recently did some pairing on someone else's computer and it took me a good 20 minutes to start reaching for the intended key instead.
Re:Vim: Spacebar as leader key, CapsLock as Esc
by normalocity on Monday December 16, 2013 @01:08PM
(#6916548)
Sorry, I guess I didn't describe that in the article. I've updated the article to include this link:
http://learnvimscriptthehardway.stevelosh.com/chapters/06.ht...
I also fixed the display of the .vimrc file so you can see the "<Leader>" entries.
Re:Vim: Spacebar as leader key, CapsLock as Esc
by toki5 on Monday December 16, 2013 @01:08PM
(#6916547)
In vim, you can use the leader key to set up shortcuts, e.g.:
:map <Leader>W :w [some things you want to tack onto w]
The leader key is by default '\', so that's effectively mapping \W to :w [some things ...]
He's replacing his leader key with space.