Thursday, August 20, 2009

Applying 4 commands repetetively

I want to apply the same 4 commands to about 500 different files, and since
its the same commands in the same order each time, I don't want to
repetetively type the commands over and over again.

I want to do:

vi 1*

dd
:set local noswapfile undolevels=-1
:%join!
:n

dd
:set local noswapfile undolevels=-1
:%join!
:n

dd
:set local noswapfile undolevels=-1
:%join!
:n

....

over and over again until there are no longer any more files.

Is this possible in vim ??

Thanks in advance.
--
View this message in context: http://www.nabble.com/Applying-4-commands-repetetively-tp25068524p25068524.html
Sent from the Vim - General mailing list archive at Nabble.com.


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

No comments:

Post a Comment