Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

ma, mb, mc => 'a, 'b, 'c => ...just being able to "tag" each of the three functions you're working with (comparing, copying, moving code, whatever) it's eventually worth it to get them into your muscle memory. And once you "get" marks, then you "get" registers "for free".


and this is why i always read vim articles... i've never used registers in my life.


I'll use them in macros fairly frequently: vawy'f => function name, vi{y'b => body, vi(y'a => args

...or y'x to keep something kindof handy that I can drop in at the right place (sometimes with a macro...)

    qadi('xpq => @a => @@...
(Record macro "a", delete inner parentheses, paste from the "x" register, stop recording => play macro "a" => play last macro...)

If I keep "x" clean/protected then I can delete or edit the rest of the time all willy-nilly and not worry about clobbering what I'm trying to paste into the right spots.




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

Search: