Previous: File filters Up: Selecting editing options and languages Next: User-defined Tools

Editing options

medit has some editing options which can be set in the document text, or in the Preferences dialog for sets of files or for given syntax highlighting language.

To set the options in the document text, place the following on the first, second or the last line of the document:

-%- options -%-

where options is the option string

key: value; key: value; ...

(the latter is the format used also in the Preferences dialog).

Values can be strings, integers, or booleans.

Booleans are yes, no, true, false, 1, 0.

If a string value contains : character, then the following syntax may be used: key=/value/. Any character may be used instead of slash (and it must not occur in the value). Example: word-chars=@-/:@

The following options are available:

lang syntax highlighting language to use in this document.
strip a boolean value, whether trailing whitespace should be removed from the document on save.
add-newline a boolean value, whether the editor should ensure that saved files have a trailing new line character.
tab-width displayed width of the Tab character. NOTE: This is not an indentation offset, this is the visual width of a Tab character.
use-tabs whether the Tab character should be used for indentation.
indent-width an integer specifying indentation offset used when the Tab key is pressed to indent text.

medit tries to understand modelines of Vim, Emacs, and Kate text editors, so chances are it will correctly pick up the conventional settings from source files.


Previous: File filters Up: Selecting editing options and languages Next: User-defined Tools