PageRenderTime 50ms CodeModel.GetById 43ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/www/tags/NOV_07_2009/htdocs/users-guide/buffer-local.html

#
HTML | 32 lines | 32 code | 0 blank | 0 comment | 0 complexity | 59f29ee69110b6348dbc5e15f3d202cd MD5 | raw file
 1<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.73.2"><link rel="start" href="index.html" title="jEdit 4.3 User's Guide"><link rel="up" href="customizing.html" title="Chapter 7. Customizing jEdit"><link rel="prev" 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><p>Buffer-local properties provide an alternate way to change editor
 2        settings on a per-buffer basis. While changes made in the
 3        <span class="guimenuitem"><strong>Buffer Options</strong></span> dialog box are lost after the
 4        buffer is closed, buffer-local properties take effect each time the file
 5        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
 6        colon-enclosed name/value pairs. For example, placing the following in a
 7        buffer changes the indent width to 4 characters, enables soft tabs, and
 8        activates the Perl edit mode:</p><pre class="screen">:indentSize=4:noTabs=true:mode=perl:</pre><p>Adding buffer-local properties to a buffer takes effect after the
 9        next time the buffer is saved.</p><p>The following table describes each buffer-local property in
10        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><code class="varname">collapseFolds</code></td><td>Folds with a level of this or higher will be
11                        collapsed when the buffer is opened. If set to zero, all
12                        folds will be expanded initially. See <a class="xref" href="folding.html" title="Folding">the section called &#8220;Folding&#8221;</a>.</td></tr><tr><td><code class="varname">deepIndent</code></td><td>When set to &#8220;<span class="quote">true</span>&#8221;, multiple-line
13                        expressions delimited by parentheses are aligned like
14                        so: <pre class="programlisting">retVal.x = (int)(horizontalOffset
15    + Chunk.offsetToX(info.chunks,
16                      offset));</pre> With this setting disabled, the
17                        text would look like so: <pre class="programlisting">retVal.x = (int)(horizontalOffset
18    + Chunk.offsetToX(info.chunks,
19    offset));</pre></td></tr><tr><td><code class="varname">folding</code></td><td>The fold mode; one of &#8220;<span class="quote">none</span>&#8221;,
20                        &#8220;<span class="quote">indent</span>&#8221;, &#8220;<span class="quote">explicit</span>&#8221;, or the
21                        name of a plugin folding mode. See <a class="xref" href="folding.html" title="Folding">the section called &#8220;Folding&#8221;</a>.</td></tr><tr><td><code class="varname">indentSize</code></td><td>The width, in characters, of one indent. Must be
22                        an integer greater than 0. See <a class="xref" href="indent.html" title="Tabbing and Indentation">the section called &#8220;Tabbing and Indentation&#8221;</a>.</td></tr><tr><td><code class="varname">maxLineLen</code></td><td>The maximum line length and wrap column position.
23                        Inserting text beyond this column will automatically
24                        insert a line break at the appropriate position. See
25                        <a class="xref" href="entering-text.html" title="Inserting and Deleting Text">the section called &#8220;Inserting and Deleting Text&#8221;</a>.</td></tr><tr><td><code class="varname">mode</code></td><td>The default edit mode for the buffer. See <a class="xref" href="modes.html" title="Edit Modes">the section called &#8220;Edit Modes&#8221;</a>.</td></tr><tr><td><code class="varname">noTabs</code></td><td>If set to &#8220;<span class="quote">true</span>&#8221;, soft tabs
26                        (multiple space characters) will be used instead of
27                        &#8220;<span class="quote">real</span>&#8221; tabs. See <a class="xref" href="indent.html" title="Tabbing and Indentation">the section called &#8220;Tabbing and Indentation&#8221;</a>.</td></tr><tr><td><code class="varname">noWordSep</code></td><td>A list of non-alphanumeric characters that are
28                        <span class="emphasis"><em>not</em></span> to be treated as word
29                        separators. Global default is &#8220;<span class="quote">_</span>&#8221;.</td></tr><tr><td><code class="varname">tabSize</code></td><td>The tab width. Must be an integer greater than 0.
30                        See <a class="xref" href="indent.html" title="Tabbing and Indentation">the section called &#8220;Tabbing and Indentation&#8221;</a>.</td></tr><tr><td><code class="varname">wordBreakChars</code></td><td>Characters, in addition to spaces and tabs, at
31                        which lines may be split when word wrapping. See <a class="xref" href="entering-text.html" title="Inserting and Deleting Text">the section called &#8220;Inserting and Deleting Text&#8221;</a>.</td></tr><tr><td><code class="varname">wrap</code></td><td>The word wrap mode; one of &#8220;<span class="quote">none</span>&#8221;,
32                        &#8220;<span class="quote">soft</span>&#8221;, or &#8220;<span class="quote">hard</span>&#8221;. See <a class="xref" href="word-wrap.html" title="Wrapping Long Lines">the section called &#8220;Wrapping Long Lines&#8221;</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>