Ex notes

From Noah.org
Jump to: navigation, search


Ex scripts are pretty much exactly what you would type in vi in command mode (the mode when you press : key). So you can pretty much open Vim and record what you type to make a change to a conf file.

There are a few differences. Normally you might use vi to write to a different file like this:

w newfile.conf

In Ex, you have to use the ! modifier after the w to force it to write the file. By default ex will obey 'w' to write over the current file, but to write to a new or existing file you must use this:

w! newfile.conf