Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Contribute
Contribute
Link to Us
Linux Jobs


More on LinuxToday


Open Source Software Shortcut, Permanently Storing Macros in Vim

Jun 08, 2010, 23:16 (0 Talkback[s])
(Other stories by Juliet Kemp)

"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

Related Stories: