PageRenderTime 123ms CodeModel.GetById 80ms app.highlight 5ms RepoModel.GetById 35ms app.codeStats 0ms

/jEdit/tags/jedit-4-2-pre14/doc/users-guide/basics.xml

#
XML | 240 lines | 235 code | 2 blank | 3 comment | 0 complexity | 965fbfa8ba73023044794e93a1e5f600 MD5 | raw file
  1<!-- jEdit buffer-local properties: -->
  2<!-- :indentSize=1:noTabs=true: -->
  3<!-- :xml.root=users-guide.xml: -->
  4
  5<chapter id="basics"><title>jEdit Basics</title>
  6 <sect1 id="overview"><title>Interface Overview</title>
  7  <para>
  8   A <firstterm>view</firstterm> is the jEdit term for an editor window.
  9   It is possible to have multiple views open at once, and each view can
 10   be split into multiple panes. jEdit remembers the state of open views between editing sessions.
 11  </para>
 12  <para>
 13   An open file is referred to as a <firstterm>buffer</firstterm>.
 14   Unlike some editors where each buffer gets its own view, jEdit completely separates the two concepts. A buffer might be visible in several views, or none at all.
 15  </para>
 16  <para>
 17   The drop-down list at the top of the view shows all open buffers; selecting one will make it visible in the view's text area. Different emblems are displayed next to buffer names in the list,
 18   depending the buffer's state;
 19   a red disk is shown for buffers with unsaved changes,
 20   a lock is shown for read-only buffers,
 21   and a spark is shown for new buffers which don't yet exist on disk.
 22  </para>
 23  <para>
 24   As with most other graphical applications, there is a tool bar at the top of the view which provides quick access to frequently-used commands. Also, clicking the text area with the right mouse button displays a popup menu which also facilitates quick access to various commands.
 25   Both the tool bar and the right-click menu can be completely customized to suit your tastes in the <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global
 26   Options</guimenuitem> dialog box; see <xref linkend="context-pane" />
 27   and <xref linkend="toolbar-pane"/>.
 28  </para>
 29  <para>
 30   Most of the view is taken up by the text area. If you've ever used a graphical user interface before, the text area will be instantly familiar. Text can be inserted simply by typing. More details on text insertion and deletion can be found in <xref linkend="entering-text"/>.
 31  </para>
 32  <para>
 33   The strip on the left of the text area is called a <firstterm>gutter</firstterm>.
 34   The gutter displays marker and register locations, as well as folding arrows; it will also display
 35   line numbers if the 
 36   <guimenu>View</guimenu>&gt;<guimenuitem>Line Numbers</guimenuitem> (shortcut: <keycap>C+e C+t</keycap>) command is invoked. Note this command only takes effect until the view is closed. To have line numbers visible all the time, enable the appropriate setting in the <guilabel>Gutter</guilabel> pane of the <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global Options</guimenuitem> dialog box.
 37  </para>
 38 </sect1>
 39
 40 <sect1 id="buffers"><title>Switching Buffers</title>
 41  <para>
 42   In addition to using the drop-down list at the top of the view, as documented in the previous section, the current buffer can also be switched using menu item commands and their keyboard shortcuts.
 43  </para>
 44  <para>
 45   <guimenu>View</guimenu>&gt;<guimenuitem>Go to Previous Buffer</guimenuitem>
 46   (keyboard shortcut: <keycap>C+PAGE_UP</keycap>) switches to the previous buffer in the list.
 47  </para>
 48  <para>
 49   <guimenu>View</guimenu>&gt;<guimenuitem>Go to Next Buffer</guimenuitem>
 50   (keyboard shortcut: <keycap>C+PAGE_DOWN</keycap>) switches to the next buffer in the list.
 51  </para>
 52  <para>
 53   <guimenu>View</guimenu>&gt;<guimenuitem>Go to Recent Buffer</guimenuitem>
 54   (keyboard shortcut: <keycap>C+BACK_QUOTE</keycap>)
 55   flips between the two most recently edited buffers.
 56  </para>
 57  <para>
 58   <guimenu>View</guimenu>&gt;<guimenuitem>Show Buffer Switcher</guimenuitem>
 59   (keyboard shortcut: <keycap>A+BACK_QUOTE</keycap>)
 60   has the same effect as clicking on the buffer switcher combo box.
 61  </para>
 62  <para>
 63   If you prefer an alternative graphical paradigm for switching buffers, take a look at one of these plugins:
 64  </para>
 65  <itemizedlist>
 66   <listitem><para><application>BufferList</application></para></listitem>
 67   <listitem><para><application>BufferSelector</application></para></listitem>
 68   <listitem><para><application>BufferTabs</application></para></listitem>
 69  </itemizedlist>
 70  <para>
 71   If you decide to use one of these plugins, you can hide the popup menu buffer switcher in the <guilabel>View</guilabel> pane of the <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global Options</guimenuitem> dialog box.
 72  </para>
 73  <para>
 74   A number of plugins that implement fast keyboard-based buffer switching are available as well:
 75  </para>
 76  <itemizedlist>
 77   <listitem><para><application>FastOpen</application></para></listitem>
 78   <listitem><para><application>OpenIt</application></para></listitem>
 79   <listitem><para><application>SwitchBuffer</application></para></listitem>
 80  </itemizedlist>
 81 </sect1>
 82 <sect1 id="views"><title>Multiple Views</title>
 83  <para>
 84   As documented at the beginning of this chapter, multiple views can be opened at once, and views can be split into multiple panes.
 85  </para>
 86  <para>
 87   <guimenu>View</guimenu>&gt;<guimenuitem>New View</guimenuitem> creates a new view.
 88  </para>
 89  <para>
 90   <guimenu>View</guimenu>&gt;<guimenuitem>New Plain View</guimenuitem> creates
 91   a new view but without any tool bars or docked windows. This can be used to
 92   open a small, unobtrusive window for taking notes and so on.
 93  </para>
 94  <para>
 95   <guimenu>View</guimenu>&gt;<guimenuitem>Close View</guimenuitem> closes the
 96   current view. If only one view is open, closing it will exit jEdit,
 97   unless background mode is on; see <xref linkend="starting" /> for information
 98   about starting jEdit in background mode.
 99  </para>
100  <para>
101   <guimenu>View</guimenu>&gt;<guimenuitem>Split
102   Horizontally</guimenuitem>
103   (shortcut: <keycap>C+2</keycap>)
104   splits the view into two text areas, placed above each other.
105  </para>
106  <para>
107   <guimenu>View</guimenu>&gt;<guimenuitem>Split
108   Vertically</guimenuitem>
109   (shortcut: <keycap>C+3</keycap>)
110   splits the view into two text areas, placed next to each other.
111  </para>
112  <para>
113   <guimenu>View</guimenu>&gt;<guimenuitem>Unsplit Current</guimenuitem>
114   (shortcut: <keycap>C+0</keycap>)
115   removes the split containing the current text area only.
116  </para>
117  <para>
118   <guimenu>View</guimenu>&gt;<guimenuitem>Unsplit All</guimenuitem>
119   (shortcut: <keycap>C+1</keycap>)
120   removes all splits from the view.
121  </para>
122  <para>
123   When a view is split, editing commands operate on the text area that
124   has keyboard focus. To give a text area keyboard focus, click in it
125   with the mouse, or use the following commands.
126  </para>
127  <para>
128   <guimenu>View</guimenu>&gt;<guimenuitem>Go to
129   Previous Text Area</guimenuitem>
130   (shortcut: <keycap>A+PAGE_UP</keycap>)
131   shifts keyboard focus to the previous text area.
132  </para>
133  <para>
134   <guimenu>View</guimenu>&gt;<guimenuitem>Go to
135   Next Text Area</guimenuitem>
136   (shortcut: <keycap>A+PAGE_DOWN</keycap>)
137   shifts keyboard focus to the next text area.
138  </para>
139 </sect1>
140  <sect1 id="docking"><title>Window Docking</title>
141   <para>
142    Various jEdit and plugin
143    windows can be docked into the view for convenience. Dockable windows
144    have a popup button in their top-left corner. Clicking this button displays a menu with commands for docking the window in one of four sides of the view.
145   </para>
146   <para>
147    On each side of the text area where there are docked windows, a strip of buttons is shown. There is a button for activating each docked window, as well as a close box and a popup menu button, which when clicked shows a menu for moving or undocking the currently selected window. The popup menu also contains a command for opening a new floating instance of the current window.
148   </para>
149   <para>
150    The commands in the <guimenu>View</guimenu>&gt;<guisubmenu>Docking</guisubmenu>
151    menu move keyboard focus between docking areas.
152   </para>
153   <para>
154    Dockable windows can also be configured in the <guilabel>Docking</guilabel> pane of the <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global Options</guimenuitem> dialog box.
155   </para>
156   <sidebar><title>For power users</title>
157    <para>
158     Each dockable has three commands associated with it; one is part of the
159     menu bar and opens the dockable. The other two commands are:
160    </para>
161    <itemizedlist>
162     <listitem><para><guimenuitem>Window Name
163     (Toggle)</guimenuitem> - opens the dockable window if it is hidden, and
164     hide it if its already open.</para></listitem>
165     <listitem><para><guimenuitem>Window Name
166     (New Floating Instance)</guimenuitem> - opens a new instance of the
167     dockable in a floating window, regardless of the docking
168     configuration. For example, this can be used to view two
169     different directories side-by-side in two file system browser windows.</para>
170     <para>
171     A new floating instance can also be opened from the dockable window's popup menu.
172     </para>
173    </listitem>
174    </itemizedlist>
175    <para>
176     These commands cannot be invoked from the menu bar. However, they can be
177     added to the tool bar or context menu, and given keyboard shortcuts;
178     see <xref linkend="global-opts" />.
179    </para>
180   </sidebar>
181  </sect1>
182  <sect1 id="status-bar"><title>The Status Bar</title>
183   <para>
184    The <firstterm>status bar</firstterm> at the bottom of the view consists
185    of the following components, from left to right:
186   </para>
187   <itemizedlist>
188    <listitem><para>The line number containing the caret</para></listitem>
189    <listitem><para>The column position of the caret, with the leftmost column
190    being 1.</para>
191    <para>
192     If the line contains tabs, the <firstterm>file</firstterm> position (where a hard
193     tab is counted as one column) is shown first, followed by the
194     <firstterm>screen</firstterm> position (where each tab counts for the number of
195     columns until the next tab stop).
196    </para>
197    <para>
198     Double-clicking on the caret location indicator displays the
199     <guimenu>Edit</guimenu>&gt;<guimenuitem>Go to Line</guimenuitem> dialog
200     box; see <xref linkend="lines" />.
201    </para></listitem>
202    <listitem><para>A message area where various prompts and status messages
203    are shown.</para></listitem>
204    <listitem><para>The current buffer's edit mode, fold mode,
205    and character encoding. Double-clicking one of these
206    displays the <guimenu>Utilities</guimenu>&gt;<guimenuitem>Buffer
207    Options</guimenuitem> dialog box. For more information about these settings,
208    see:</para>
209    <itemizedlist>
210     <listitem><para><xref linkend="buffer-opts" /></para></listitem>
211     <listitem><para><xref linkend="modes" /></para></listitem>
212     <listitem><para><xref linkend="folding" /></para></listitem>
213     <listitem><para><xref linkend="encodings" /></para></listitem>
214    </itemizedlist>
215    </listitem>
216    <listitem><para>A set of
217    flags which indicate various editor features and settings. Clicking each
218    flag will toggle the feature in question; hovering the mouse over a flag
219    will show a tool tip with an explanation:</para>
220    <itemizedlist>
221    <listitem><para>Word wrap - see <xref linkend="word-wrap" />.</para></listitem>
222    <listitem><para>Multiple selection - see <xref linkend="multi-select" />.</para></listitem>
223    <listitem><para>Rectangular selection - see <xref linkend="rect-select" />.</para></listitem>
224    <listitem><para>Overwrite mode - see <xref linkend="entering-text" />.</para></listitem>
225    <listitem><para>Line separator - see <xref linkend="line-separators" />.</para></listitem>
226    </itemizedlist>
227    </listitem>
228    <listitem><para>A Java heap memory usage indicator, that shows used and
229    total heap memory, in megabytes. Double-clicking this indicator opens the
230    <guimenu>Utilities</guimenu>&gt;<guisubmenu>Troubleshooting</guisubmenu>&gt;<guimenuitem>Memory Status</guimenuitem>
231    dialog box.</para></listitem>
232   </itemizedlist>
233   <para>
234    The visibility of each of the above items can be controlled in the
235    <guibutton>Status Bar</guibutton> pane of the
236    <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global Options</guimenuitem>
237    dialog box; see <xref linkend="status-bar-pane"/>.
238   </para>
239 </sect1>
240</chapter>