News for hackers. Stuff that matters.
Re:Why, oh why, do those nutheads use vi? (2007) by h0l0cube on Tuesday December 07, 2021 @02:13AM (#29469813)
How about macros? I find i use them on at least a daily basis
Re:Why, oh why, do those nutheads use vi? (2007) by vicda on Tuesday December 07, 2021 @02:38AM (#29469951)
Macros and replaying my last command at a new location are the biggest thing I miss from vim. With regex replace groups you can generally get close enough to the desired productivity though.

(Personally, I find vim's multiselect cumbersome to use compared to sublime/vscode's.)

Re:Why, oh why, do those nutheads use vi? (2007) by cercatrova on Tuesday December 07, 2021 @02:22AM (#29469863)
What kinds of macros do you use?
Re:Why, oh why, do those nutheads use vi? (2007) by h0l0cube on Tuesday December 07, 2021 @02:41AM (#29469968)
You can build a macro on the fly to do some transformation for, say, a line of text, or even a function, and just repeat those manipulations. Usually they are crude combinations of vim inputs that work well enough for the situation at hand. Obviously it's not a replacement for IDE refactoring, but if you're using a vim emulator, you can do both
Re:Why, oh why, do those nutheads use vi? (2007) by beej71 on Tuesday December 07, 2021 @09:12AM (#29472615)
One transform I've done a few times is something where you have a list like this:

foo bar baz

And you need each line transformed into:

[Foo](https://example.com/foo.html)

Or something like that. Macros make short work of it.

Re:Why, oh why, do those nutheads use vi? (2007) by WithinReason on Tuesday December 07, 2021 @12:40PM (#29475665)
Multiple cursors as well.
Re:Why, oh why, do those nutheads use vi? (2007) by beej71 on Saturday December 11, 2021 @04:23PM (#29524417)
My multiple cursor-fu isn't good enough to know how to do that with words of different lengths. I should get more into it.