File filters tab
Prev | Chapter 1. Preferences | Next

## File filters tab

File filters tab section allows to customize editing options, as well as syntax highlighting language, on per-document basis using regular expressions which are matched against the document filename (globs can also be used, see below). Full file paths are used, so one can have per-directory settings.

The filters are applied in the order they appear in the list, one by one. All filters are applied to every file, so several filters may affect options in the same file. In this way one can set some options for a set of files or a directory, then set or modify some additional options for certain files in that set, etc.

To add a filter, use New button. Click the filter in the list to select it, then click the Filter or Options part of it to edit. Use Delete button to delete a filter, and Up and Down buttons to change the order in which they are applied.

Filter field contains a regular expression matched agains the document filename. If it is found in the filename, then the options from the Options field are applied to the document. Example:

    projects/moo/

Use dollar if you need to match ends of filenames, e.g. "`\.doc$`" will work as "`*.doc`" pattern.

Alternatively it can be a comma-separated list of globs prefixed with "`globs:`" or a list of language ids prefixed with "`langs:`", e.g.

    globs:*.c,*.h

or

    langs:c,c++

Options field contains the options, in format described in the section called “Options for editing text”.

Prev | Up | Next
Languages tab | Home | File Selector tab