News for hackers. Stuff that matters.
Re:My Favorite Vim Oneliners for Text Manipulation by Izkata on Sunday August 06, 2023 @02:47AM (#37019568)
I habitually use visual mode for a lot of stuff like that so quick flash shows me what was affected (in case of typo). If the highlighted part isn't what I expected I instantly know to undo, rather than having to think about the resulting text for a moment.
Re:My Favorite Vim Oneliners for Text Manipulation by williamdclt on Sunday August 06, 2023 @06:02AM (#37020513)
Same. Which shows a weakness of vim, I think it’d be much more usable if it had the verb last: iw would select the word then you can delete, yank, or even extend the selection knowing exactly what you’re going to operate on.

I think kakoune works like that, but I don’t have the will to learn another editor and vi is what’s available everywhere anyway

Re:My Favorite Vim Oneliners for Text Manipulation by xigoi on Sunday August 06, 2023 @11:30AM (#37022994)
The problem with Kakoune-like object-action order is that you need more modifier keys.