I am using VIM to clean up a data source, and format it properly for use with SIMILE Timeline.
VIM works great, but as far as I know it can’t be automated, so I was thinking of using something like SED to clean up the datasource. I know SED can be used to do search and replace, but when I use VIM to clean the data up, I use a combination of VIM macros and vim regex search and replace.
Is there any equivalent to VIM macros in SED?
For very simple text processing (i.e. using Vim like an enhanced ‘sed’ or ‘awk’, maybe just benefitting from the enhanced regular expressions in a
:substitutecommand), use Ex-mode.Note: silent batch mode
-s-exmesses up the Windows console, so you may haveto do a
clsto clean up after the Vim run.Attention: Vim will hang waiting for input if the “commands.ex” file doesn’t
exist; better check beforehand for its existence! Alternatively, Vim can read
the commands from stdin. You can also fill a new buffer with text read from
stdin, and read commands from stderr if you use the – argument.
For more advanced processing involving multiple windows, and real automation
of Vim (where you might interact with the user or leave Vim running to let the
user take over), use:
Here’s a summary of the used arguments: