I have a number of multi million line sets of data to edit before using a program to analyse them.I have a set of regexp (23 of them) which do the work. Things like :%s/\n\n/\r to get rid of multiple blank linesHow can I turn this set of commands into a script?
Turning a set of vi regexp into a script
vimscript;regular expression
You can add the following lines to your vimrc:function! MyRegex()    execute '%s/\n\n/\r'     Add other regexes hereendfunctionAnd you can then open your buffer and use :call MyRegex() to apply your regexes.execute allows you to execute a command from a script (See :h :execute)You might also want to have a look at :h substitute() which you can use from a script too.