Ask Your Question

How do I set macros in Vim ? [closed]

asked 2011-09-30 01:56:55 -0500

shanks gravatar image

Occasionally, you'll find yourself doing the same thing over and over in your document. So how does one record an ad-hoc macro to perform the operation.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by zoltanh721
close date 2014-07-04 05:05:40.366764

1 Answer

Sort by ยป oldest newest most voted

answered 2011-09-30 01:59:37 -0500

shanks gravatar image

qmacro starts macro recording into the named "macro". For instance, "qa" starts recording and puts the macro into macro "a".

q End recording.

@macro Replay the macro stored in the named macro. For instance, "@a" (without quotes) replays the macro in macro "a".

edit flag offensive delete link more

Question Tools


Asked: 2011-09-30 01:56:55 -0500

Seen: 205 times

Last updated: Sep 30 '11