Buffer-Local Properties

Buffer-local properties provide an alternate way to change editor settings on a per-buffer basis. While changes made in the Buffer Options dialog box are lost after the buffer is closed, buffer-local properties take effect each time the file is opened, because they are embedded in the file itself.

When jEdit loads a file, it checks the first and last 10 lines for colon-enclosed name/value pairs. The following example changes the indent width to 4 characters, enables soft tabs, and sets the buffer's edit mode to Perl:

:indentSize=4:noTabs=true:mode=perl:

Note that adding buffer-local properties to a buffer only takes effect after the next time the buffer is loaded.

The following table describes each buffer-local property in detail.

Property nameDescription
collapseFoldsFolds with a level of this or higher will be collapsed when the buffer is opened. If set to zero, all folds will be expanded initially. See the section called "Folding".
foldingThe fold mode; one of "none", "indent", or "explicit". See the section called "Folding".
indentOnEnterIf set to "true", pressing Enter will insert a line break and automatically indent the new line. See the section called "Tabbing and Indentation".
indentOnTabIf set to "true", indentation will be performed when the Tab key is pressed. See the section called "Tabbing and Indentation".
indentSizeThe width, in characters, of one indent. Must be an integer greater than 0. See the section called "Tabbing and Indentation".
maxLineLenThe maximum line length and wrap column position. Inserting text beyond this column will automatically insert a line break at the appropriate position. See the section called "Inserting and Deleting Text".
modeThe default edit mode for the buffer. See the section called "Edit Modes".
noTabsIf set to "true", soft tabs (multiple space characters) will be used instead of "real" tabs. See the section called "Tabbing and Indentation".
noWordSepA list of non-alphanumeric characters that are not to be treated as word separators. Global default is "_".
tabSizeThe tab width. Must be an integer greater than 0. See the section called "Tabbing and Indentation".
wordBreakCharsCharacters, in addition to spaces and tabs, at which lines may be split when word wrapping. See the section called "Inserting and Deleting Text".
wrapThe word wrap mode; one of "none", "soft", or "hard". See the section called "Word Wrap".