PageRenderTime 66ms CodeModel.GetById 61ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-0-pre3/doc/users-guide/basics.xml

#
XML | 246 lines | 243 code | 1 blank | 2 comment | 0 complexity | 85c3ccc4364fab49e60b05a6df2e4417 MD5 | raw file
  1<!-- jEdit buffer-local properties: -->
  2<!-- :indentSize=1:noTabs=true: -->
  3
  4<chapter id="basics"><title>jEdit Basics</title>
  5 <sect1 id="buffers"><title>Buffers</title>
  6  <para>
  7   Several files can be opened and edited at once.
  8   Each open file is referred to as a <firstterm>buffer</firstterm>.
  9   The combo box above the text area selects the buffer to edit.
 10   Different emblems are displayed next to buffer names in the list,
 11   depending the buffer's state;
 12   a red disk is shown for buffers with unsaved changes,
 13   a lock is shown for read-only buffers,
 14   and a spark is shown for new buffers which don't yet exist on disk.
 15  </para>
 16  <para>
 17   In addition to the buffer combo box, various commands can also be
 18   used to select the buffer to edit.
 19  </para>
 20  <para>
 21   <guimenu>View</guimenu>&gt;<guimenuitem>Go to Previous Buffer</guimenuitem>
 22   (keyboard shortcut: <keycombo><keycap>Control</keycap><keycap>Page Up</keycap>
 23   </keycombo>) switches to the previous buffer in the list.
 24  </para>
 25  <para>
 26   <guimenu>View</guimenu>&gt;<guimenuitem>Go to Next Buffer</guimenuitem>
 27   (keyboard shortcut: <keycombo><keycap>Control</keycap><keycap>Page Down</keycap>
 28   </keycombo>) switches to the next buffer in the list.
 29  </para>
 30  <para>
 31   <guimenu>View</guimenu>&gt;<guimenuitem>Go to Recent Buffer</guimenuitem>
 32   (keyboard shortcut: <keycombo><keycap>Control</keycap><keycap>`</keycap></keycombo>)
 33   switches to the buffer that was being edited prior to the current one.
 34  </para>
 35  <sidebar><title>Memory usage</title>
 36   <para>
 37    The maximum number of open buffers depends on available <firstterm>Java
 38    heap memory</firstterm>. Each buffer requires the memory of
 39    approximately two and a half it's size on disk. This overhead is caused
 40    by the file being stored internally as Unicode (see
 41    <xref linkend="encodings" />), and the fact that additional information,
 42    such as line numbers, also needs to be stored.
 43   </para>
 44   <para>
 45    The status bar at the bottom of the view displays used and total Java
 46    heap memory; see <xref linkend="status-bar" /> for details. This can give
 47    you a rough idea of how much memory the currently opened files are using.
 48    The Java heap grows if it runs out of room; but it only grows to a certain
 49    maximum size, and attempts to allocate Java objects that would grow the
 50    heap beyond this size fail with out-of-memory errors.
 51   </para>
 52   <para>
 53    One side-effect of this is that if the maximum heap size is set too low,
 54    opening large files or performing other memory-intesive operations can
 55    fail, even if you have a lot of system memory free. The solution is to
 56    change the Java heap size.
 57   </para>
 58  </sidebar>
 59 </sect1>
 60 <sect1 id="views"><title>Views</title>
 61  <para>
 62   Each editor window is known as a <firstterm>view</firstterm>.
 63   It is possible to have multiple views open at once, and each view can
 64   be split into multiple panes.
 65  </para>
 66  <para>
 67   <guimenu>View</guimenu>&gt;<guimenuitem>New View</guimenuitem> creates a new view.
 68  </para>
 69  <para>
 70   <guimenu>View</guimenu>&gt;<guimenuitem>Close View</guimenuitem> closes the
 71   current view. If only one view is open, closing it will exit jEdit,
 72   unless background mode is on; see <xref linkend="starting" /> for information
 73   about starting jEdit in background mode.
 74  </para>
 75  <para>
 76   <guimenu>View</guimenu>&gt;<guimenuitem>Split
 77   Horizontally</guimenuitem>
 78   (shortcut: <keycombo><keycap>Control</keycap><keycap>2</keycap></keycombo>)
 79   splits the view into two text areas, above each other.
 80  </para>
 81  <para>
 82   <guimenu>View</guimenu>&gt;<guimenuitem>Split
 83   Vertically</guimenuitem>
 84   (shortcut: <keycombo><keycap>Control</keycap><keycap>3</keycap></keycombo>)
 85   splits the view into two text areas, next to each other.
 86  </para>
 87  <para>
 88   <guimenu>View</guimenu>&gt;<guimenuitem>Unsplit</guimenuitem>
 89   (shortcut: <keycombo><keycap>Control</keycap><keycap>1</keycap></keycombo>)
 90   removes all but the current text area from the view.
 91  </para>
 92  <para>
 93   When a view is split, editing commands operate on the text area that
 94   has keyboard focus. To give a text area keyboard focus, click in it
 95   with the mouse, or use the following commands.
 96  </para>
 97  <para>
 98   <guimenu>View</guimenu>&gt;<guimenuitem>Go to
 99   Previous Text Area</guimenuitem>
100   (shortcut: <keycombo><keycap>Alt</keycap><keycap>Page Up</keycap></keycombo>)
101   shifts keyboard focus to the previous text area.
102  </para>
103  <para>
104   <guimenu>View</guimenu>&gt;<guimenuitem>Go to
105   Next Text Area</guimenuitem>
106   (shortcut: <keycombo><keycap>Alt</keycap><keycap>Page Down</keycap></keycombo>)
107   shifts keyboard focus to the next text area.
108  </para>
109  <para>
110   Clicking the text area with the right mouse button displays a popup menu.
111   Both this menu and the tool bar at the top of the view offer quick
112   mouse-based access to frequently-used commands.
113   The contents of the tool bar and right-click menu can be
114   changed in the <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global
115   Options</guimenuitem> dialog box.
116  </para>
117  <sect2 id="docking"><title>Window Docking</title>
118   <para>
119    The file system browser, HyperSearch results window, and many plugin
120    windows can optionally be docked into the view. This can be
121    configured in the <guibutton>Docking</guibutton> pane of the
122    <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global Options</guimenuitem>
123    dialog box; see <xref linkend="global-opts" />.
124   </para>
125   <para>
126    When windows are docked into the view, strips of buttons are shown in the
127    left, right, top, and bottom sides of the text area. Each strip contains
128    buttons for the windows docked in that location, as well as a close box.
129    Clicking a window's button shows that dockable window; clicking the close
130    box hides the window again.
131   </para>
132   <para>
133    The commands in the <guimenu>View</guimenu>&gt;<guisubmenu>Docking</guisubmenu>
134    menu (shortcuts: <keycombo><keycap>Control</keycap><keycap>E</keycap></keycombo>
135    <keycap>1</keycap>, <keycap>2</keycap>, <keycap>3</keycap>, <keycap>4</keycap>)
136    provide keyboard equivalents for the close boxes.
137   </para>
138  </sect2>
139  <sect2 id="status-bar"><title>The Status Bar</title>
140   <para>
141    A <firstterm>status bar</firstterm> at the bottom of the view displays the
142    following information, from left to right:
143   </para>
144   <itemizedlist>
145    <listitem><para>The line number containing the caret</para></listitem>
146    <listitem><para>The column position of the caret, with the leftmost column
147    being 1.</para>
148    <para>
149     If the line contains tabs, the <firstterm>file</firstterm> position (where a hard
150     tab is counted as one column) is shown first, followed by the
151     <firstterm>screen</firstterm> position (where each tab counts for the number of
152     columns until the next tab stop).
153    </para>
154    <para>
155     Double-clicking on the caret location indicator displays the
156     <guimenu>Edit</guimenu>&gt;<guimenuitem>Go to Line</guimenuitem> dialog
157     box; see <xref linkend="lines" />.
158    </para>
159    </listitem>
160    <listitem><para>Prompts displayed by commands such as those dealing with
161    registers and markers (see <xref linkend="text-transfer" /> and <xref
162    linkend="markers" />), also I/O progress messages (see
163    <xref linkend="threaded-io" />)</para></listitem>
164    <listitem><para>The current buffer's edit mode. Double-clicking this
165    displays the <guimenu>Utilities</guimenu>&gt;<guimenuitem>Buffer
166    Options</guimenuitem> dialog box. See <xref
167    linkend="modes" /> and <xref linkend="buffer-opts" />.</para></listitem>
168    <listitem><para>The current buffer's character encoding.  Double-clicking this
169    displays the <guimenu>Utilities</guimenu>&gt;<guimenuitem>Buffer
170    Options</guimenuitem> dialog box. See <xref
171    linkend="encodings" /> and <xref linkend="buffer-opts" />.</para></listitem>
172    <listitem><para>The current buffer's fold mode; this is either
173    <quote>none</quote>, <quote>indent</quote> or <quote>explicit</quote>.
174    Clicking here toggles between the three modes. See <xref linkend="folding" />.
175    </para></listitem>
176    <listitem><para>If multiple selection is enabled, the string
177    <guilabel>multi</guilabel>; otherwise <guilabel>single</guilabel> is shown.
178    Clicking here or pressing <keycombo><keycap>Control</keycap>
179    <keycap>\</keycap></keycombo> turns multiple selection on and off. See <xref
180    linkend="multi-select" />.</para></listitem>
181    <listitem><para>If overwrite mode is enabled, the string
182    <guilabel>ovr</guilabel>; otherwise <guilabel>ins</guilabel> is shown.
183    Clicking here or pressing
184    <keycap>Insert</keycap> turns overwrite mode on and off. See <xref
185    linkend="entering-text" />.</para></listitem>
186    <listitem><para>A Java heap memory usage indicator, that shows used versus
187    total heap memory, in megabytes. Double-clicking here opens the
188    <guimenu>Utilities</guimenu>&gt;<guimenuitem>Memory Status</guimenuitem>
189    dialog box.</para></listitem>
190   </itemizedlist>
191  </sect2>
192 </sect1>
193 <sect1 id="textarea"><title>The Text Area</title>
194  <para>
195   Text editing takes place in the text area. It behaves in a similar
196   manner to many Windows and MacOS editors; the few
197   unique features will be described in this section.
198  </para>
199  <para>
200   The text area will automatically scroll up or down if the caret is moved
201   closer than three lines to the first or last visible line. This
202   feature is called <firstterm>electric scrolling</firstterm> and can be disabled
203   in the <guibutton>Text Area</guibutton> pane of the
204   <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global Options</guimenuitem>
205   dialog box; see <xref linkend="global-opts" />.
206  </para>
207  <para>
208   To aid in locating the caret, the current line is drawn with a
209   different background color. To make it clear which lines end with
210   white space, end of line markers are drawn at the end of each line.
211   Both these features can be disabled in the <guibutton>Text Area</guibutton>
212   pane of the <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global
213   Options</guimenuitem> dialog box.
214  </para>
215  <para>
216   The strip on the left of the text area is called a <firstterm>gutter</firstterm>.
217   The gutter displays marker and register locations; it will also display
218   line numbers if the 
219   <guimenu>View</guimenu>&gt;<guimenuitem>Line Numbers</guimenuitem> (shortcut:
220   <keycombo><keycap>Control</keycap><keycap>E</keycap></keycombo>
221   <keycombo><keycap>Control</keycap><keycap>T</keycap></keycombo>) command is invoked.
222  </para>
223 </sect1>
224 <sect1 id="repeat"><title>Command Repetition</title>
225  <para>
226   To repeat a command any number of times, invoke
227   <guimenu>Utilities</guimenu>&gt;<guimenuitem>Repeat Next Command</guimenuitem>
228   (shortcut:
229   <keycombo><keycap>Control</keycap><keycap>Enter</keycap></keycombo>) and enter the
230   desired repeat count, followed by the command to repeat (either a keystroke
231   or menu item selection). For example,
232   <quote><keycombo><keycap>Control</keycap><keycap>Enter</keycap></keycombo>
233   <keycap>1</keycap> <keycap>4</keycap>
234   <keycombo><keycap>Control</keycap><keycap>D</keycap></keycombo></quote> will delete
235   14 lines, and <quote><keycombo><keycap>Control</keycap><keycap>Enter</keycap></keycombo>
236   <keycap>8</keycap>
237   <keycap>#</keycap></quote>
238   will insert <quote>########</quote> in the buffer.
239  </para>
240  <para>
241   If you specify a repeat count greater than 20, a confirmation dialog box will
242   be displayed, asking if you really want to perform the action. This prevents
243   you from hanging jEdit by executing a command too many times.
244  </para>
245 </sect1>
246</chapter>