Thu, 10 Aug 2006
Embedding vim option settings in a file
You can use modelines to add Vim option settings to the contents of a file.
For example, in a C file, you can add the following line to the top or the
bottom of the file:
/* vim: set textwidth=76 nopaste: */
This will set the 'textwidth' option to 76 and not allow pasting, when editing
that C file. For this to work, the 'modeline' option should be set. By
default, the 'modeline' option is set.
Posted at: 21:28 | category: /vi | Comments ()
Rustybear Blog