# jEdit 2.6 User's Guide

Next, Prev

## Chapter 9. Customizing jEdit

# Buffer-Local Properties

The Buffer Options dialog box only changes settings for the duration of the editing session. It is also possible to change settings for all future editing sessions using buffer-local properties.

When jEdit loads a file, it checks the first 10 lines for colon-enclosed name/value pairs. The following example will set the tab size to 8 characters, enable soft tabs, and set the default edit mode of the file to Perl:

    :noTabs=true:tabSize=8:mode=perl:

Buffer-local properties take effect the next time the file is opened. The following table lists all valid properties.

Table 9-1. Table of buffer-local properties

Property name | Description
--- | ---
blockComment | The block comment string. A block comment is one that extends to the end of the line. For example, in Java mode the default value is "//". See the section called Commenting Out Code in Chapter 6.
boxComment | The box comment string. A box comment is one delimited by the wing comment strings, but with the box comment string also at the start of each line. For example, in Java mode the default value is "*". See the section called Commenting Out Code in Chapter 6.
commentEnd | The wing comment end string. For example, in Java mode the default value is "*/". See the section called Commenting Out Code in Chapter 6.
commentStart | The wing comment start string. For example, in Java mode the default value is "/*". See the section called Commenting Out Code in Chapter 6.
doubleBracketIndent | If a line matches the indentPrevLine regular expression and the next line contains an opening bracket, a level of indent will not be added to the next line, unless this property is set to "true".
indentOnEnter | If set to "true", indentation will be performed when the Enter key is pressed. See the section called Tabbing and Indentation in Chapter 6.
indentOnTab | If set to "true", indentation will be performed when the Tab key is pressed. See the section called Tabbing and Indentation in Chapter 6.
indentCloseBrackets | A list of characters (usually brackets) that subtract indent from the current line. For example, in Java mode the default value is "}".
indentOpenBrackets | A list of characters (usually brackets) that add indent to the next line. For example, in Java mode the default value is "{".
indentPrevLine | When indenting a line, jEdit checks if the previous line matches the regular expression stored in this property. If it does, a level of indent is added. For example, in Java mode this regular expression matches "if", "else", "while", etc.
mode | The default edit mode for the buffer. See Chapter 5.
noTabs | If set to "true", soft tabs (multiple space characters) will be used instead of "real" tabs. See the section called Tabbing and Indentation in Chapter 6.
noWordSep | A list of non-alphanumeric characters that are not to be treated as word separators. For example, in Java mode the default value is "_" because the underscore can be used in Java identifiers, and it is useful to be able to select and complete them in one operation.
syntax | If set to "true", syntax highlighting will be performed. See the section called Syntax Highlighting in Chapter 5.
tabSize | The tab width. This must be an integer greater than 0. See the section called Tabbing and Indentation in Chapter 6.

Home, Up
Prev: Customizing jEdit
Next: The Global Options Dialog Box