3 ms·
What are some examples what the macro function can be used for? In many cases the macros I need are so specific such that I define them on the fly in VIM (i.e.
by hacker42 10y ago
What are some examples what the macro function can be used for? In many cases the macros I need are so specific such that I define them on the fly in VIM (i.e. q [a-z] and then q to stop, finally @ [a-z] for playback). Perhaps I simply don't write enough for macros to take advantage of more permanent macros.
- deleted 10y ago[deleted]
- DontGiveTwoFlux 10y agoHere's a vim tip that has me using macros way more frequently! Map <space><space> to @q. That way we to record a macro, space space to play it. Much easier to remember, especially because I usually only use one macro at a time like you said. Plus you get the satisfaction of mashing space and watching your screen light up with changes.
- zafiro17 10y agoI'm not a programmer, I'm a manager that spends far too many hours a day glued to Microsoft Outlook (kill me, please). I found the macros useful simply to repeat often typed phrases or keystrokes. So for example, I bound F3 to the expression "Best regards, zafiro17" followed by Alt-S which is bound by default to "Send" in Outlook. So I'd write the body of an email, then hit F3 and the keyboard would add my closing and hit send.