The tutorial mentions that the Ex-mode is for batch processing. Since it is a nuisance, rather than a tool, for me, I would like to see some practical examples. Who uses it? Why?
What is the EX-mode for batch processing for?
feedback
|
This question came from our site for professional and enthusiast programmers.
|
Ex-Mode is mostly for performing the same action on a number of files. Say you have 25 .html files all with:
Instead of opening each one of those, you could use Ex-mode to change it all to
| |||||
feedback
|
|
As of the recent 7.3 which as persistent undo support, ex mode and other forms of vim batch processing is superior to other non-vim methods, since it will not clobber the undo history. Adding: 'persistent undo' if enabled, keeps all changes to a file (up to a limit) in the undo history, across vim editing sessions. If the file is edited by an external program, vim will reset the undo history when detecting by checksum that it has changed. vim -E will allow you to batch-edit a file and the edit will be in the undo history. | ||||
|
feedback
|