Hacker News new | past | comments | ask | show | jobs | submit login

What kinds of macros do you use?



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


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.


Multiple cursors as well.


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.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: