The Modelines plugin allows gedit to analyze the lines of text at the start and end of a file, and then apply a set of document preferences to the file. The Modelines plugin supports a subset of the options used by the Emacs, Kate and Vim text editors.
To enable the Modelines plugin, select gedit ▸ Preferences ▸ Plugins ▸ Modelines.
The following options can be set using gedit modelines:
Inserting spaces instead of tabs
Right margin width
Preferences set using modelines take precedence over the ones specified in the preference dialog.
The first two lines of a document are scanned for Emacs modelines, and gedit supports the following Emacs modeline options:
For more information on Emacs modelines, visit the .
The first and last ten lines a document are scanned for Kate modelines, and gedit supports the following Kate modeline options:
For more information about Kate modelines, visit the .
The first and last three lines a document are scanned for Vim modelines, and gedit supports the following Vim modeline options:
For more information on Vim modelines, visit the .
Got a comment? Spotted an error? Found the instructions unclear? Send feedback about this page.