Thursday, November 3, 2011

Re: vim command line use

   I would like to use it to search a list of files and substitute a new string for a pattern it finds, and then write the resulting file to a new filename for each file in the original list.



These command line switches may be of 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>


sed or awk could be a very nice option if you are on a *nix OS.  If it is a Windows machine you should be able to use these switches along with a file of recorded commands (ie <scriptin>)  

--
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:

Post a Comment