Skip to Content
Mastering Vim
book

Mastering Vim

by Ruslan Osipov
November 2018
Beginner
330 pages
7h 21m
English
Packt Publishing
Content preview from Mastering Vim

Running macros across multiple files

If you wanted to replay a macro across multiple files, you can use (you guessed it) arglist. Arglist allows you to execute normal mode commands with :normal command. For instance, you could run a macro from register a, as follows:

:arg **/* .py:argdo execute ":normal @a" | update

Here, :normal @a will execute macro a in normal mode, and update will save the buffer contents. You'll probably want to use arglist with recursive macros.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Vim

Mastering Vim

Damian Conway
Vim Masterclass

Vim Masterclass

Jason Cannon
Modern Vim

Modern Vim

Drew Neil

Publisher Resources

ISBN: 9781789341096Supplemental Content