On Mon, Oct 02, 2006 at 01:13:47PM -0500, Tom Purl wrote: > I'm trying to execute a series of Vim commands on multiple files. Here's > the workflow: > > 1. Open a file using gvim > 2. Execute a named macro (that was recorded using the `q + a` command) > 3. Save and close my file (which forces me to close gvim in this > example). > 4. Repeat on the next file without having to re-record my macro. > > This works for me with vim, but for some reason, when I re-open gvim, it > forgets my "@ macro". What setting can I change to fix this?
How about changing the workflow to: 1. Open all the files you want to edit: $ vim FILE1 FILE2 ... 2. Record the macro while editing the first file then close that file, (if you are using 'set hidden' use :bdelete). For this example lets assume the macro is recorded to register a 3. Apply the macro to all buffers by running :bufdo normal @a 4. Save the changes by running :wall Note: you may want to check that the macro had the desired effect before saving the files, shift through the buffers with :bnext and :bprev. -- Thor Andreassen