27 ms·
Oh yeah I did use "dd" and "p". They work OK, although they don't allow selecting multiple lines that don't follow each other.
by mknsri 4y ago
Oh yeah I did use "dd" and "p". They work OK, although they don't allow selecting multiple lines that don't follow each other.
- wruza 4y agoWhat’s the use case for this disjoint selection?
- gbin 4y agoJust use the number of lines you want to cut like 3dd This is consistent for all commands.
- maleldil 4y ago> 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.