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