Live data from Hacker News

Vim: Spacebar as leader key, CapsLock as Esc

karmanebula.com

1–10 of 44 posts

Re: Vim: Spacebar as leader key, CapsLock as Esc

#3
post #2

What is a leader key? How much typing class did I miss?!

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

#4
post #2

What is a leader key? How much typing class did I miss?!

In vim, you can use the leader key to set up shortcuts, e.g.:

:map 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.

Re: Vim: Spacebar as leader key, CapsLock as Esc

#5
post #2

What is a leader key? How much typing class did I miss?!

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 "" entries.

Re: Vim: Spacebar as leader key, CapsLock as Esc

#8
post #2

What is a leader key? How much typing class did I miss?!

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

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.
Post reply on HN