PageRenderTime 235ms CodeModel.GetById 225ms app.highlight 7ms RepoModel.GetById 0ms app.codeStats 1ms


HTML | 34 lines | 34 code | 0 blank | 0 comment | 0 complexity | f0f4a296ed9c020c6d9ba572e80cd288 MD5 | raw file
 1<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
 2        issuing the <span class="guimenu"><strong>Edit</strong></span>&gt;<span class="guimenuitem"><strong>Expand
 3        Abbreviation</strong></span> (keyboard shortcut: <code class="keycap">C+;</code>),
 4        which takes the word before the caret as the abbreviation name. If that
 5        particular abbreviation was not yet set, a dialog will pop up, and you
 6        can enter the text to insert before and after the caret. After the
 7        abbreviation is created, it can be viewed or edited from the
 8        <span class="guibutton"><strong>Abbreviations</strong></span> pane of the
 9        <span class="guimenu"><strong>Utilities</strong></span>&gt;<span class="guimenuitem"><strong>Global
10        Options</strong></span> dialog box; see <a class="xref" href="global-opts.html#abbrevs-pane" title="The Abbreviations Pane">the section called &#8220;The Abbreviations Pane&#8221;</a>.</p><p>Using abbreviations reduces the time spent typing long but
11        commonly used strings. For example, in Java mode, the abbreviation
12        &#8220;<span class="quote">sout</span>&#8221; is defined to expand to
13        &#8220;<span class="quote">System.out.println()</span>&#8221;, so to insert
14        &#8220;<span class="quote">System.out.println()</span>&#8221; in a Java buffer, you only need to
15        type &#8220;<span class="quote">sout</span>&#8221; followed by <code class="keycap">C+;</code>. An
16        abbreviation can either be global, in which case it can be used in all
17        edit modes, or specific to a single mode.</p><p>The Java, VHDL. XML and XSL edit modes include some pre-defined
18        abbreviations you might find useful. Other modes do not have any
19        abbreviations defined by default.</p><p></p><p>Automatic abbreviation expansion can be enabled in the
20        <span class="guibutton"><strong>Abbreviations</strong></span> pane of the
21        <span class="guimenu"><strong>Utilities</strong></span>&gt;<span class="guimenuitem"><strong>Global
22        Options</strong></span> dialog box. If enabled, pressing the space bar
23        after entering an abbreviation will automatically expand it.</p><p>If automatic expansion is enabled, a space can be inserted without
24        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
25            abbreviations much more useful. The best way to describe them is
26            with an example.</p><p>Java mode defines an abbreviation &#8220;<span class="quote">F</span>&#8221; that is set
27            to expand to the following:</p><pre class="programlisting">for(int $1 = 0; $1 &lt; $2; $1++)</pre><p>Expanding <code class="literal">F#j#array.length#</code> will insert the
28            following text into the buffer:</p><pre class="programlisting">for(int j = 0; j &lt; array.length; j++)</pre><p>Expansions can contain up to nine positional parameters. Note
29            that a trailing hash character (&#8220;<span class="quote">#</span>&#8221;) must be entered
30            when expanding an abbreviation with parameters.</p><p>If you do not specify the correct number of positional
31            parameters when expanding an abbreviation, any missing parameters
32            will be blank in the expansion, and extra parameters will be
33            ignored. A status bar message will be shown stating the required
34            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>