products/sources/formale Sprachen/Isabelle/Tools/jEdit/dist/doc/users-guide/bracket-matching.html |
 |
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Bracket Matching</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="jEdit 5.6 User's Guide"><link rel="up" href="source-edit.html" title="Chapter 6. Editing Source Code"><link rel="prev" href="commenting.html" title="Commenting Out Code"><link rel="next" href="abbrevs.html" title="Abbreviations"></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">Bracket Matching</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="commenting.html">Prev</a> </td><th width="60%" align="center">Chapter 6. Editing Source Code</th><td width="20%" align="right"> <a accesskey="n" href="abbrevs.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="bracket-matching"></a>Bracket Matching</h2></div></div></div><p>Misplaced and unmatched brackets are one of the most common syntax
errors encountered when writing code. jEdit has several features to make
brackets easier to deal with.</p><p>Positioning the caret immediately after a bracket will highlight
the corresponding closing or opening bracket (assuming it is visible),
and draw a scope indicator in the gutter. If the highlighted bracket is
not visible, the text of the matching line will be shown in the status
bar. If the matching line consists of only whitespace and the bracket
itself, the <span class="emphasis"><em>previous line</em></span> is shown instead. This
feature is very useful when your code is indented as follows, with
braces on their own lines:</p><pre class="programlisting">public void someMethod()
{
if(isOK)
{
doSomething();
}
}</pre><p>Invoking
<span class="guimenu"><strong>Edit</strong></span>><span class="guisubmenu"><strong>Source</strong></span>><span class="guimenuitem"><strong>Go
to Matching Bracket</strong></span> (shortcut: <code class="keycap">C+]</code>) or
clicking the scope indicator in the gutter moves the caret to the
matching bracket.</p><p><span class="guimenu"><strong>Edit</strong></span>><span class="guisubmenu"><strong>Source</strong></span>><span class="guimenuitem"><strong>Select
Code Block</strong></span> (shortcut: <code class="keycap">C+[</code>) selects all
text between the closest two brackets surrounding the caret.</p><p>Holding down <code class="keycap">Control</code> while clicking the scope
indicator in the gutter or a bracket in the text area will select all
text between the two matching brackets.</p><p><span class="guimenu"><strong>Edit</strong></span>><span class="guisubmenu"><strong>Source</strong></span>><span class="guimenuitem"><strong>Go
to Previous Bracket</strong></span> (shortcut: <code class="keycap">C+e C+[</code>)
moves the caret to the previous opening bracket.</p><p><span class="guimenu"><strong>Edit</strong></span>><span class="guisubmenu"><strong>Source</strong></span>><span class="guimenuitem"><strong>Go
to Next Bracket</strong></span> (shortcut: <code class="keycap">C+e C+]</code>) moves
the caret to the next closing bracket.</p><p>Bracket highlighting in the text area and bracket scope display in
the gutter can be customized in the <span class="guibutton"><strong>Text Area</strong></span> and
<span class="guibutton"><strong>Gutter</strong></span> panes of the
<span class="guimenu"><strong>Utilities</strong></span>><span class="guimenuitem"><strong>Options</strong></span>
dialog box; see <a class="xref" href="global-opts.html" title="The Global Options Dialog Box">the section called “The Global Options Dialog Box”</a>.</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>jEdit's bracket matching algorithm only checks syntax tokens
with the same type as the original bracket, so for example unmatched
brackets inside string literals and comments will be skipped when
matching brackets that are part of program syntax.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="commenting.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="abbrevs.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Commenting Out Code </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Abbreviations</td></tr></table></div></body></html>
¤ Dauer der Verarbeitung: 0.27 Sekunden
(vorverarbeitet)
¤
|
Haftungshinweis
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.
|