PageRenderTime 45ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/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
  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.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>
  2. Buffer-local properties provide an alternate way to change editor settings
  3. on a per-buffer basis. While changes made in the <span><b class="guimenuitem">Buffer
  4. Options</b></span> dialog box
  5. are lost after the buffer is closed, buffer-local properties take effect
  6. each time the file is opened, because they are embedded in the file
  7. itself.
  8. </p><p>
  9. When jEdit loads a file, it checks the first and last 10 lines for
  10. colon-enclosed name/value pairs. For example, placing the following in
  11. a buffer changes
  12. the indent width to 4 characters, enables soft tabs, and activates the
  13. Perl edit mode:
  14. </p><table border="0" bgcolor="#E0E0E0"><tr><td><pre class="screen">:indentSize=4:noTabs=true:mode=perl:</pre></td></tr></table><p>
  15. Adding buffer-local properties to a buffer
  16. takes effect after the next time the buffer is saved.
  17. </p><p>
  18. The following table describes each buffer-local property in detail.
  19. </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
  20. buffer is opened. If set to zero, all folds will be expanded initially.
  21. See <a href="folding.html" title="Folding">the section called &#8220;Folding&#8221;</a>.</td></tr><tr><td><tt class="varname">deepIndent</tt></td><td>When set to &#8220;<span class="quote">true</span>&#8221;, multiple-line expressions delimited by parentheses are aligned like so:
  22. <table border="0" bgcolor="#E0E0E0"><tr><td><pre class="programlisting">retVal.x = (int)(horizontalOffset
  23. + Chunk.offsetToX(info.chunks,
  24. offset));</pre></td></tr></table>
  25. With this setting disabled, the text would look like so:
  26. <table border="0" bgcolor="#E0E0E0"><tr><td><pre class="programlisting">retVal.x = (int)(horizontalOffset
  27. + Chunk.offsetToX(info.chunks,
  28. offset));</pre></td></tr></table></td></tr><tr><td><tt class="varname">folding</tt></td><td>The fold mode; one of &#8220;<span class="quote">none</span>&#8221;, &#8220;<span class="quote">indent</span>&#8221;,
  29. &#8220;<span class="quote">explicit</span>&#8221;, or the name of a plugin folding mode.
  30. See <a href="folding.html" title="Folding">the section called &#8220;Folding&#8221;</a>.</td></tr><tr><td><tt class="varname">indentSize</tt></td><td>The width, in characters, of one indent.
  31. Must be an integer greater than 0.
  32. See <a href="indent.html" title="Tabbing and Indentation">the section called &#8220;Tabbing and Indentation&#8221;</a>.</td></tr><tr><td><tt class="varname">maxLineLen</tt></td><td>The maximum line length and wrap column position.
  33. Inserting text beyond this column will automatically insert a line
  34. break at the appropriate position.
  35. See <a href="entering-text.html" title="Inserting and Deleting Text">the section called &#8220;Inserting and Deleting Text&#8221;</a>.</td></tr><tr><td><tt class="varname">mode</tt></td><td>The default edit mode for the buffer.
  36. See <a href="modes.html" title="Edit Modes">the section called &#8220;Edit Modes&#8221;</a>.</td></tr><tr><td><tt class="varname">noTabs</tt></td><td>If set to &#8220;<span class="quote">true</span>&#8221;, soft tabs (multiple space characters)
  37. will be used instead of &#8220;<span class="quote">real</span>&#8221; tabs. See
  38. <a href="indent.html" title="Tabbing and Indentation">the section called &#8220;Tabbing and Indentation&#8221;</a>.</td></tr><tr><td><tt class="varname">noWordSep</tt></td><td>A list of non-alphanumeric characters that are
  39. <span class="emphasis"><em>not</em></span> to
  40. be treated as word separators. Global default is &#8220;<span class="quote">_</span>&#8221;.</td></tr><tr><td><tt class="varname">tabSize</tt></td><td>The tab width. Must be an integer greater than 0.
  41. See <a href="indent.html" title="Tabbing and Indentation">the section called &#8220;Tabbing and Indentation&#8221;</a>.</td></tr><tr><td><tt class="varname">wordBreakChars</tt></td><td>Characters, in addition to spaces and tabs, at which lines may be
  42. split when word wrapping.
  43. See <a href="entering-text.html" title="Inserting and Deleting Text">the section called &#8220;Inserting and Deleting Text&#8221;</a>.</td></tr><tr><td><tt class="varname">wrap</tt></td><td>The word wrap mode; one of &#8220;<span class="quote">none</span>&#8221;, &#8220;<span class="quote">soft</span>&#8221;,
  44. or &#8220;<span class="quote">hard</span>&#8221;. See <a 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>