I find it convenient to remap the backtick key "`" to single-quote "'". Functionally, they are very similar. Backtick takes you to an exact mark location while single-quote simply takes you to the beginning of the marked line. I don't use the single-quote functionality much, and it's much easier to reach than backtick, so the following mapping saves some finger stretching.
nnoremap ' `
nnoremap ` '
Monday, January 12, 2009
Subscribe to:
Post Comments (Atom)
7 comments:
That's a really good idea. For some reason, it does not work for me though. (Yes, I've restarted vim).
Casey
What a great tip! Thanks!
Casey: I was a bit tired when I tried this tip and missed the space between ` and ' at first. Make sure you haven't made the same mistake :)
Thanks noid, that was the mistake I made. Works great now.
Casey
How about a share-your-.vimrc thread? That might generate some useful tips.
That's a nice idea. I'll put my vimrc online soon.
Similarly, if you set preference nostartofline, movement commands like Ctrl-F, gg, etc., will try to retain the same column after the move, rather than moving the cursor to the beginning of the line.
In my version, 7.2.77, the help says that backtick (`) and single quote (') are the same.
So no need to map.
Thats good for non-us keyboards (it was need to type four backticks to jump to the mark)
Post a Comment