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

Just use the number of lines you want to cut like 3dd This is consistent for all commands.


> they don't allow selecting multiple lines that don't follow each other.

3dd won't work. You can use registers, though:

1. "ayy for the first line 2. "Ayy for the subsequent lines (repeat using .) 3. "ap to paste.

You can replace a/A with other letters to copy into multiple registers. If there are patterns (e.g. odd lines to A and even lines to B), you can even record a macro.

I think registers are not something most Vim users use, however. I have no data to back this up, but I wouldn't be surprised if Vim is like Git, where people learn the commands for 80% of scenarios and Google the rest. In Vim, case, they might even settle for a very inefficient solution if the problem is not recurring.




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

Search: