PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/www/tags/NOV_07_2009/htdocs/42docs/users-guide/selection.html

#
HTML | 102 lines | 102 code | 0 blank | 0 comment | 0 complexity | 86220a766dc12870f6e2ef148f2a19eb MD5 | raw file
  1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Selecting Text</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="editing.html" title="Chapter 5. Editing Text"><link rel="previous" href="caret.html" title="Moving The Caret"><link rel="next" href="entering-text.html" title="Inserting and Deleting Text"></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">Selecting Text</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="caret.html">Prev</a> </td><th width="60%" align="center">Chapter 5. Editing Text</th><td width="20%" align="right"> <a accesskey="n" href="entering-text.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="selection"></a>Selecting Text</h2></div></div><div></div></div><p>
  2   A <i class="firstterm">selection</i> is a block of text marked for further
  3   manipulation. Range selections are equivalent to selections in most other text editors; they cover text between two points in a buffer. jEdit also allows rectangular selections that cover a rectangular area (some text editors refer to these as &#8220;<span class="quote">column selections</span>&#8221;). Furthermore, several chunks of text can be
  4   selected and operated on simultaneously.
  5  </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2597571"></a>Range Selection</h3></div></div><div></div></div><p>
  6   Dragging the mouse creates a range selection from where the mouse was
  7   pressed to where it was released.
  8   Holding down <tt class="keycap">Shift</tt> while clicking a location in the
  9   buffer will create a selection from the caret position to the clicked
 10   location.
 11  </p><p>
 12   Holding down <tt class="keycap">Shift</tt> in addition to a caret movement key
 13   (<tt class="keycap">LEFT</tt>, <tt class="keycap">UP</tt>, <tt class="keycap">HOME</tt>, etc) will
 14   extend a selection in the specified direction.
 15  </p><p>
 16   <span><b class="guimenu">Edit</b></span>&gt;<span><b class="guimenuitem">Select All</b></span> (shortcut:
 17   <tt class="keycap">C+a</tt>) selects the
 18   entire buffer.
 19  </p><p>
 20   <span><b class="guimenu">Edit</b></span>&gt;<span><b class="guisubmenu">More Selection</b></span>&gt;<span><b class="guimenuitem">Select None</b></span> (shortcut:
 21   <tt class="keycap">ESCAPE</tt>) deactivates the selection.
 22  </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="rect-select"></a>Rectangular Selection</h3></div></div><div></div></div><p>
 23    Dragging with the <tt class="keycap">Control</tt> key held down will create a
 24    rectangular selection. Holding down
 25    <tt class="keycap">Shift</tt> and <tt class="keycap">Control</tt> while clicking a
 26    location in the buffer will create a rectangular selection from the caret
 27    position to the clicked location.
 28   </p><p>
 29    Alternatively, invoking
 30    <span><b class="guimenu">Edit</b></span>&gt;<span><b class="guisubmenu">More
 31    Selection</b></span>&gt;<span><b class="guimenuitem">Rectangular Selection</b></span>
 32    (shortcut: <tt class="keycap">A+\</tt>)
 33    toggles rectangular selection mode. In rectangular selection mode, dragging the mouse always creates a rectangular selection, and keyboard commands that would normally create a range selection create a rectangular selection instead.
 34    A status bar indicator is shown when this mode is enabled.
 35   </p><p>
 36    It is possible to select a rectangle with zero width but non-zero height.
 37    This can be used to insert a new column between two existing
 38    columns, for example. Such zero-width selections are shown as a thin
 39    vertical line.
 40   </p><p>
 41    Inserting text into a rectangular selection repeats the text going down as many times as necessary, and shifts the selection to the right. This makes it behave like a &#8220;<span class="quote">tall</span>&#8221; caret.
 42   </p><p>
 43    Rectangles can be deleted, copied, pasted, and operated on using ordinary
 44    editing commands. If necessary, rectangular selections are automatically filled in with whitespace to maintain alignment.
 45   </p><p>
 46    Rectangular selections can extend beyond the end of a line into
 47    &#8220;<span class="quote">virtual space</span>&#8221;. Furthermore,
 48    if keyboard rectangular selection mode is on or if the
 49    <tt class="keycap">Control</tt> key is being held down, clicking beyond the
 50    end of a line will insert the appropriate amount of whitespace in order
 51    to position the cursor at the clicked location.
 52   </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
 53     Rectangular selections are implemented using character offsets,
 54     not absolute screen positions, so they might not behave as you might
 55     expect if a proportional-width font is being used or if soft wrap is
 56     enabled. The text area font can be changed in the
 57     <span><b class="guibutton">Text Area</b></span> pane of the
 58     <span><b class="guimenu">Utilities</b></span>&gt;<span><b class="guimenuitem">Global Options</b></span>
 59     dialog box. For information about soft wrap,
 60     see <a href="word-wrap.html" title="Wrapping Long Lines">the section called &#8220;Wrapping Long Lines&#8221;</a>.
 61    </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="multi-select"></a>Multiple Selection</h3></div></div><div></div></div><p>
 62    <span><b class="guimenu">Edit</b></span>&gt;<span><b class="guisubmenu">More
 63    Selection</b></span>&gt;<span><b class="guimenuitem">Multiple Selection</b></span>
 64    (keyboard shortcut: <tt class="keycap">C+\</tt>)
 65    turns multiple selection mode on and
 66    off. In multiple selection mode, multiple fragments of text can be selected
 67    and operated on simultaneously, and the caret can be moved independently
 68    of the selection. The status bar indicates if multiple
 69    selection mode is active; see <a href="status-bar.html" title="The Status Bar">the section called &#8220;The Status Bar&#8221;</a>.
 70   </p><p>
 71    Various jEdit commands behave differently with multiple selections:
 72   </p><div class="itemizedlist"><ul type="disc"><li><p>Commands that copy text place the contents of
 73    each selection, separated by line breaks, in the specified register.
 74    </p></li><li><p>Commands that insert (or paste) text replace each selection
 75    with the entire text that is being inserted.</p></li><li><p>Commands that filter text (such as <span><b class="guimenuitem">Spaces to
 76    Tabs</b></span>, <span><b class="guimenuitem">Range Comment</b></span>,
 77    <span><b class="guimenuitem">Replace in Selection</b></span>, and so on) behave as if
 78    each block was selected independently, and the command invoked on each in
 79    turn.</p></li><li><p>Line-based commands (such as <span><b class="guimenuitem">Shift Indent
 80    Left</b></span>, <span><b class="guimenuitem">Shift Indent Right</b></span>, and
 81    <span><b class="guimenuitem">Line Comment</b></span>) operate on each line that contains
 82    at least one selection.
 83    </p></li><li><p>Caret movement commands that would normally deactivate the
 84    selection (such as the arrow keys, while <tt class="keycap">Shift</tt> is not being
 85    held down), move the caret, leaving the selection as-is.</p></li><li><p>Some older plugins may not support multiple selection at
 86    all.</p></li></ul></div><p>
 87    <span><b class="guimenu">Edit</b></span>&gt;<span><b class="guisubmenu">More
 88    Selection</b></span>&gt;<span><b class="guimenuitem">Select None</b></span>
 89    (shortcut: <tt class="keycap">ESCAPE</tt>) deactivates the selection containing the
 90    caret, if there is one. Otherwise it deactivates all active selections.
 91   </p><p>
 92    <span><b class="guimenu">Edit</b></span>&gt;<span><b class="guisubmenu">More
 93    Selection</b></span>&gt;<span><b class="guimenuitem">Invert Selection</b></span>
 94    (shortcut: <tt class="keycap">C+e C+i</tt>) selects a set of text chunks such that all text
 95    that was formerly part of a selection is now unselected, and all text that
 96    wasn't, is selected.
 97   </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
 98     Deactivating multiple selection
 99     mode while multiple blocks of text are selected will leave the selections
100     in place, but you will not be able to add new selections until
101     multiple selection mode is reactivated.
102    </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="caret.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="editing.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="entering-text.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Moving The Caret </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Inserting and Deleting Text</td></tr></table></div></body></html>