/www/tags/NOV_07_2009/htdocs/users-guide/abbrevs.html
HTML | 34 lines | 34 code | 0 blank | 0 comment | 0 complexity | f0f4a296ed9c020c6d9ba572e80cd288 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>Abbreviations</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="source-edit.html" title="Chapter 6. Editing Source Code"><link rel="prev" href="bracket-matching.html" title="Bracket Matching"><link rel="next" href="folding.html" title="Folding"></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">Abbreviations</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bracket-matching.html">Prev</a> </td><th width="60%" align="center">Chapter 6. Editing Source Code</th><td width="20%" align="right"> <a accesskey="n" href="folding.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="abbrevs"></a>Abbreviations</h2></div></div></div><p>Abbreviations are invoked by typing a couple of letters and then
- issuing the <span class="guimenu"><strong>Edit</strong></span>><span class="guimenuitem"><strong>Expand
- Abbreviation</strong></span> (keyboard shortcut: <code class="keycap">C+;</code>),
- which takes the word before the caret as the abbreviation name. If that
- particular abbreviation was not yet set, a dialog will pop up, and you
- can enter the text to insert before and after the caret. After the
- abbreviation is created, it can be viewed or edited from the
- <span class="guibutton"><strong>Abbreviations</strong></span> pane of the
- <span class="guimenu"><strong>Utilities</strong></span>><span class="guimenuitem"><strong>Global
- Options</strong></span> dialog box; see <a class="xref" href="global-opts.html#abbrevs-pane" title="The Abbreviations Pane">the section called “The Abbreviations Pane”</a>.</p><p>Using abbreviations reduces the time spent typing long but
- commonly used strings. For example, in Java mode, the abbreviation
- “<span class="quote">sout</span>” is defined to expand to
- “<span class="quote">System.out.println()</span>”, so to insert
- “<span class="quote">System.out.println()</span>” in a Java buffer, you only need to
- type “<span class="quote">sout</span>” followed by <code class="keycap">C+;</code>. An
- abbreviation can either be global, in which case it can be used in all
- edit modes, or specific to a single mode.</p><p>The Java, VHDL. XML and XSL edit modes include some pre-defined
- abbreviations you might find useful. Other modes do not have any
- abbreviations defined by default.</p><p></p><p>Automatic abbreviation expansion can be enabled in the
- <span class="guibutton"><strong>Abbreviations</strong></span> pane of the
- <span class="guimenu"><strong>Utilities</strong></span>><span class="guimenuitem"><strong>Global
- Options</strong></span> dialog box. If enabled, pressing the space bar
- after entering an abbreviation will automatically expand it.</p><p>If automatic expansion is enabled, a space can be inserted without
- expanding the word before the caret by pressing <code class="keycap">Control</code>+<code class="keycap">E</code> <code class="keycap">V</code> <code class="keycap">Space</code>.</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="positional-params"></a>Positional Parameters</h3></div></div></div><p>Positional parameters are an advanced feature that make
- abbreviations much more useful. The best way to describe them is
- with an example.</p><p>Java mode defines an abbreviation “<span class="quote">F</span>” that is set
- to expand to the following:</p><pre class="programlisting">for(int $1 = 0; $1 < $2; $1++)</pre><p>Expanding <code class="literal">F#j#array.length#</code> will insert the
- following text into the buffer:</p><pre class="programlisting">for(int j = 0; j < array.length; j++)</pre><p>Expansions can contain up to nine positional parameters. Note
- that a trailing hash character (“<span class="quote">#</span>”) must be entered
- when expanding an abbreviation with parameters.</p><p>If you do not specify the correct number of positional
- parameters when expanding an abbreviation, any missing parameters
- will be blank in the expansion, and extra parameters will be
- ignored. A status bar message will be shown stating the required
- number of parameters.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bracket-matching.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="source-edit.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="folding.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Bracket Matching </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Folding</td></tr></table></div></body></html>