/www/tags/NOV_07_2009/htdocs/42docs/users-guide/buffer-local.html
HTML | 44 lines | 44 code | 0 blank | 0 comment | 0 complexity | 796bfc9f0e7906b6036757fdda71a6df MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
- <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Buffer-Local Properties</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="jEdit 4.2 User's Guide"><link rel="up" href="customizing.html" title="Chapter 7. Customizing jEdit"><link rel="previous" href="buffer-opts.html" title="The Buffer Options Dialog Box"><link rel="next" href="global-opts.html" title="The Global Options Dialog Box"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Buffer-Local Properties</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="buffer-opts.html">Prev</a> </td><th width="60%" align="center">Chapter 7. Customizing jEdit</th><td width="20%" align="right"> <a accesskey="n" href="global-opts.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="buffer-local"></a>Buffer-Local Properties</h2></div></div><div></div></div><p>
- Buffer-local properties provide an alternate way to change editor settings
- on a per-buffer basis. While changes made in the <span><b class="guimenuitem">Buffer
- Options</b></span> 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.
- </p><p>
- When jEdit loads a file, it checks the first and last 10 lines for
- colon-enclosed name/value pairs. For example, placing the following in
- a buffer changes
- the indent width to 4 characters, enables soft tabs, and activates the
- Perl edit mode:
- </p><table border="0" bgcolor="#E0E0E0"><tr><td><pre class="screen">:indentSize=4:noTabs=true:mode=perl:</pre></td></tr></table><p>
- Adding buffer-local properties to a buffer
- takes effect after the next time the buffer is saved.
- </p><p>
- The following table describes each buffer-local property in detail.
- </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Property name</th><th>Description</th></tr></thead><tbody><tr><td><tt class="varname">collapseFolds</tt></td><td>Folds 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 <a href="folding.html" title="Folding">the section called “Folding”</a>.</td></tr><tr><td><tt class="varname">deepIndent</tt></td><td>When set to “<span class="quote">true</span>”, multiple-line expressions delimited by parentheses are aligned like so:
- <table border="0" bgcolor="#E0E0E0"><tr><td><pre class="programlisting">retVal.x = (int)(horizontalOffset
- + Chunk.offsetToX(info.chunks,
- offset));</pre></td></tr></table>
- With this setting disabled, the text would look like so:
- <table border="0" bgcolor="#E0E0E0"><tr><td><pre class="programlisting">retVal.x = (int)(horizontalOffset
- + Chunk.offsetToX(info.chunks,
- offset));</pre></td></tr></table></td></tr><tr><td><tt class="varname">folding</tt></td><td>The fold mode; one of “<span class="quote">none</span>”, “<span class="quote">indent</span>”,
- “<span class="quote">explicit</span>”, or the name of a plugin folding mode.
- See <a href="folding.html" title="Folding">the section called “Folding”</a>.</td></tr><tr><td><tt class="varname">indentSize</tt></td><td>The width, in characters, of one indent.
- Must be an integer greater than 0.
- See <a href="indent.html" title="Tabbing and Indentation">the section called “Tabbing and Indentation”</a>.</td></tr><tr><td><tt class="varname">maxLineLen</tt></td><td>The maximum line length and wrap column position.
- Inserting text beyond this column will automatically insert a line
- break at the appropriate position.
- See <a href="entering-text.html" title="Inserting and Deleting Text">the section called “Inserting and Deleting Text”</a>.</td></tr><tr><td><tt class="varname">mode</tt></td><td>The default edit mode for the buffer.
- See <a href="modes.html" title="Edit Modes">the section called “Edit Modes”</a>.</td></tr><tr><td><tt class="varname">noTabs</tt></td><td>If set to “<span class="quote">true</span>”, soft tabs (multiple space characters)
- will be used instead of “<span class="quote">real</span>” tabs. See
- <a href="indent.html" title="Tabbing and Indentation">the section called “Tabbing and Indentation”</a>.</td></tr><tr><td><tt class="varname">noWordSep</tt></td><td>A list of non-alphanumeric characters that are
- <span class="emphasis"><em>not</em></span> to
- be treated as word separators. Global default is “<span class="quote">_</span>”.</td></tr><tr><td><tt class="varname">tabSize</tt></td><td>The tab width. Must be an integer greater than 0.
- See <a href="indent.html" title="Tabbing and Indentation">the section called “Tabbing and Indentation”</a>.</td></tr><tr><td><tt class="varname">wordBreakChars</tt></td><td>Characters, in addition to spaces and tabs, at which lines may be
- split when word wrapping.
- See <a href="entering-text.html" title="Inserting and Deleting Text">the section called “Inserting and Deleting Text”</a>.</td></tr><tr><td><tt class="varname">wrap</tt></td><td>The word wrap mode; one of “<span class="quote">none</span>”, “<span class="quote">soft</span>”,
- or “<span class="quote">hard</span>”. See <a href="word-wrap.html" title="Wrapping Long Lines">the section called “Wrapping Long Lines”</a>.</td></tr></tbody></table></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="buffer-opts.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="customizing.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="global-opts.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The Buffer Options Dialog Box </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> The Global Options Dialog Box</td></tr></table></div></body></html>