Open Source Software Shortcut, Permanently Storing Macros in Vim | Linux Today

Open Source Software Shortcut, Permanently Storing Macros in Vim

Written By
JK
Juliet Kemp
Jun 9, 2010

“A really useful feature of the open source editor Vim is the
macro command, which allows you to record and reply a series of
commands. To start recording, hit “q” then “a” (or any other
lowercase letter identifier). The status bar at the bottom will
show recording. Enter your commands as normal, then hit “q” again
to stop recording when you’re done. To replay the macro, type
@a.

“So far, so good, but a macro saved like this will not last
between sessions. However, the macro is saved into a normal
register in the same way as yanked text. To save it permanently,
open your ~/.vimrc file in the same session, and use “ap” to paste
in the macro commands.”


Complete Story

JK

Juliet Kemp

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.