Hacker News new | ask | show | jobs
by dschobel 4905 days ago
wow, capital register appending is super useful. lots of good tips in this one.

thanks for posting this!

2 comments

I find the difficulty is remembering this when I need it. I've read about capital registers several times, but when I am editing, and I need to copy several distinct lines, I do a "ayy "byy "cyy and then "ap "bp "cp instead of a "ayy "Ayy "Ayy -> "ap because I never remember to use capital registers. I'd love a VIM plugin that tells me that there is an easier way to what I just did by pattern matching my input.
I wonder what the complexity of a plugin would be that watches you use vim and tells if you're doing an anti-pattern?

My only gripe with vim is that the discoverability of features is god awful because :help is so overwhelming.

Yeah me too. I guess it would need to match all the wrong ways against a right way. It is probably easy for something like "jjjjj", but already someone doing BBBBi instead of I would be difficult to match: because one would also need to see where he ended up with BBBB: beginning of line or somewhere in the middle
I found the numbered registers even better, since "overwrite text with pasted content, multiple times" is a relatively common operation.