October 2015
Intermediate to advanced
356 pages
7h 54m
English
Changing Vim’s settings on the fly is all very well, but if you have customizations that you are particularly fond of, wouldn’t it be handy if they persisted between editing sessions?
We can save our customizations by writing them to a file. Then we can use the :source {file} command to apply the settings from the specified {file} to our current editing session (:sourceⓘ). When sourcing a file, Vim executes each line as an Ex command, just as though it had been entered in Command-Line mode.
Suppose that we often work on files indented with two spaces. We could create a file with the appropriate settings and save it to disk:
| | " Use two spaces for indentation |
| |