Do you need to set certain editor options for certain files - but not
use the same setup for every file you edit?
Make a special setup file with the same name and an underscore
_ ) at the end.
For instance, a file named report could have a corresponding
setup file named report_.
(You don't have to use an underscore at the end of the filename.
It's convenient though, because it's not a
The setup file has the same format as a. To make the editor read it, a function key like F1 (or any other key sequence):
map #1 :source %_^[
When you start vi, tap that key to read the setup file. (The percent sign stands for the.)
If you want to use the same setup file for several files in a directory, you might want to makebetween them. That will save disk space. It also means that if you decide to change a setup option, you can edit one of the links to the setup file and the others will have the same change.