Sunday, May 27, 2012

Re: running a batch of commands against one file.

On Sunday, 27 May, 2012 at 14:31:43 BST, john Culleton wrote:
>Running a file of commands against a single file.
>I can create a file of several hundred commands all of
>the form
>:% s/foo/bar/
>
>Of course foo and bar are different for each such command. Now
>I want to run all of those commands against file mainfile.

Have a look at 'vim --help':

-s <scriptin> Read Normal mode commands from file <scriptin>
-w <scriptout> Append all typed commands to file <scriptout>
-W <scriptout> Write all typed commands to file <scriptout>

If the commands are all in script.vim, run 'vim -s script.vim mainfile'.

--

.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: