Skip to main content


We can automate vim commands, e.g., substitutions or some other kinds of modifications by writing a series of commands in a file, for example:

%s/\\t/    /g

now if we save this text in a file called myscript.vim we can execute on whatever file with:

vim -S myscript.vim textfile1 textfile2