2 ms·
Also, if you want to see what you’re working with before you make a change in vim you can always use visual mode. So the example given, dtf would become vtfd.
by Lio 8y ago
Also, if you want to see what you’re working with before you make a change in vim you can always use visual mode.
So the example given, dtf would become vtfd. That’s one extra key stroke but realistically if you can touch type you won’t notice. You can expand that selection with ; for the next t.
Personally I’d use dtf and then just use undo if its not what I want. I’d also use dot repeat command, gcf or a visual column to act on multiple selections.
- FreeFull 8y agoUnfortunately, visual mode still only gives you a single selection.
- Lio 8y agoTrue. An alternative if you want to see all your selections highlighted would be to turn search highlighting using set incseach and hlsearch. Use / to first select what you want to change. Then use cgn to make a change and . to repeat it. n will skip a change. This still might not be exactly what you want and that’s fine. It’s always good to try new ideas and new software but for me vim gives me plenty of options already.