Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Coming home to Vim (jamisbuck.org)
19 points by prakash on Oct 11, 2008 | hide | past | favorite | 12 comments


As a TextMate user switching back to Vim shortly, I think this will come in handy! I am a huge fan of TM too, but recently I've become obsessed with not using the mouse for anything I can avoid and most of the key bindings in TM aren't too conducive to home-row-only style work. The RSI in my mouse hand is a pretty big motivator for that, too.

P.S. The comments are chock full of useful tips, tricks, and extensions so read through 'em too!

P.P.S. Speaking of RSI, I recently switched to a trackball from a mouse and noticed a reduction in pain nearly over night. Highly recommended.


1. Swap Ctrl and CapsLock (using whatever method)

2. Use Ctrl-[ instead of Esc or Ctrl-C

Now your hands can stay in perfect home-row position nearly all of the time.


   1. Swap Ctrl and CapsLock (using whatever method)
I did this until I realised I never use CapsLock. Tada, two Ctrl keys.


While you are doing that - you can also rewire your caps lock LED to show more useful information. Mine shows whether I am on Dvorak or not. (Actually it is lit when I am not on Dvorak.)


Doesn't this still require me to transfer to the arrow keys for simple movements? I much prefer hjkl, but I could be missing something here.


For vim, I meant. I use gvim on Gnome, where switching Ctrl and Caps is trivial. Dunno about TextMate's movements -- I assumed C-n, C-p, C-f, C-b etc. worked there, so with a conveniently placed Ctrl key you could still navigate without the arrow keys.


Ohhh, duh. Yes. I never did the Ctrl/Caps switch though that is quite clever. I learned from the beginning to use Ctrl-[ instead of Esc, too.


1. Swap Ctrl and Alt -- use your thumb to push control, like you would to push the Command Key in a mac.

2. Make CapsLock an extra Esc.

Your vim and emacs editing will never be the same.


Goodness, no. What kind of weird keyboard did that? Everyone knows that the appropriate position for Ctrl is to the left of 'A', and that Alt/Meta belongs below '/' where you can find it with the pinkie of your right hand. This was the layout for the Sun Type 2 (?) keyboard, and the standard for emacs users from time immemorial.


> Goodness, no. What kind of weird keyboard did that?

The point is to avoid using your pinky (weakest finger) for too many things. Mapping caps to ctrl means you're going to be using your pinky a lot. Congratulations, you've just introduced RSI to your left hand.

Check out the kinesis keyboard, where your thumbs do the major lifting: http://www.kinesis-ergo.com/advantage.htm


Nothing makes me more miserable than having to scrunch up my hand to hit the Alt key. I can deal with stretching out my hands and using the pinky -- most musical instruments don't baby the pinky, and saxophone makes it do extra work, for example. But thumb-scrunching just makes me feel clumsy.

Sorry.


I recently switched to my first mac last week. Vim is great, but theres a few things I dont like which prevent me from using it as my primary editor. Since my switch to mac I gave up zend in favor or textmate. I found a great plugin for textmate called vimate, which as it sounds is vim for textmate. While its not a full implementation is definitely a fantastic middle ground. http://www.fowpas.net/vimate




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

Search: