PageRenderTime 63ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-5-pre1/doc/users-guide/files.xml

#
XML | 716 lines | 576 code | 127 blank | 13 comment | 0 complexity | f2208982613df1845bb5dc3398bb3e38 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. <?xml version="1.0" encoding="UTF-8"?>
  2. <chapter id="files">
  3. <title>Working With Files</title>
  4. <!-- jEdit buffer-local properties: -->
  5. <!-- :tabSize=1:indentSize=1:noTabs=true:wrap=soft:maxLineLen=80: -->
  6. <!-- :xml.root=users-guide.xml: -->
  7. <section id="creating">
  8. <title>Creating New Files</title>
  9. <para><guimenu>File</guimenu>&gt;<guimenuitem>New</guimenuitem>
  10. (shortcut: <keycap>C+n</keycap>) opens a new, empty, buffer. Another way
  11. to create a new file is to specify a non-existent file name when
  12. starting jEdit on the command line. A new file will be created on disk
  13. when the buffer is saved for the first time.</para>
  14. </section>
  15. <section id="opening">
  16. <title>Opening Files</title>
  17. <para><guimenu>File</guimenu>&gt;<guimenuitem>Open</guimenuitem>
  18. (shortcut: <keycap>C+o</keycap>) displays a file system browser dialog
  19. box and loads the specified file into a new buffer.</para>
  20. <para>Multiple files can be opened at once by holding down
  21. <keycap>Control</keycap> while clicking on them in the file system
  22. browser. The file system browser supports auto-completion; typing the
  23. first few characters of a listed file name will select the file.</para>
  24. <para>More advanced features of the file system browser are described in
  25. <xref linkend="vfs-browser" />.</para>
  26. <para>The <guimenu>File</guimenu>&gt;<guimenuitem>Recent
  27. Files</guimenuitem> menu lists recently viewed files. When a recent file
  28. is opened, the caret is automatically moved to its previous location in
  29. that file. The number of recent files to remember can be changed and
  30. caret position saving can be disabled in the
  31. <guibutton>General</guibutton> pane of the
  32. <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global
  33. Options</guimenuitem> dialog box; see <xref
  34. linkend="general-pane" />.</para>
  35. <para>The <guimenu>Utilities</guimenu>&gt;<guimenuitem>Current
  36. Directory</guimenuitem> menu lists all files and directories in the
  37. current buffer's directory. Selecting a file opens it in a buffer for
  38. editing; selecting a directory opens it in the file system browser (see
  39. <xref linkend="vfs-browser" />).</para>
  40. <note>
  41. <para>Files that you do not have write access to are opened in
  42. read-only mode, where editing is not permitted.</para>
  43. </note>
  44. <tip>
  45. <para>jEdit supports transparent editing of GZipped files; if a file
  46. begins with the GZip <quote>magic number</quote>, it is
  47. automatically decompressed before loading and compressed when
  48. saving. To compress an existing file, you need to change a setting
  49. in the <guimenu>Utilities</guimenu>&gt;<guimenuitem>Buffer
  50. Options</guimenuitem> dialog box; see <xref linkend="buffer-opts" />
  51. for details.</para>
  52. </tip>
  53. </section>
  54. <section id="saving">
  55. <title>Saving Files</title>
  56. <para>Changed made in a buffer do not affect the file on disk until the
  57. buffer is <firstterm>saved</firstterm>.</para>
  58. <para><guimenu>File</guimenu>&gt;<guimenuitem>Save</guimenuitem>
  59. (shortcut: <keycap>C+s</keycap>) saves the current buffer to
  60. disk.</para>
  61. <para><guimenu>File</guimenu>&gt;<guimenuitem>Save As</guimenuitem>
  62. renames the buffer and saves it in a new location. Note that using this
  63. command to save over another open buffer will close the other buffer, to
  64. stop two buffers from being able to share the same path name.</para>
  65. <para><guimenu>File</guimenu>&gt;<guimenuitem>Save a Copy
  66. As</guimenuitem> saves the buffer to a different location but does not
  67. rename the buffer, and does not clear the
  68. <quote>modified</quote> flag. Note that using this command to save over
  69. another open buffer will automatically reload the other buffer.</para>
  70. <para><guimenu>File</guimenu>&gt;<guimenuitem>Save All</guimenuitem>
  71. (shortcut: <keycap>C+e C+s</keycap>) saves all open buffers to disk,
  72. asking for confirmation first. The confirmation dialog can be disabled
  73. in the <guilabel>General</guilabel> pane of the
  74. <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global
  75. Options</guimenuitem> dialog box.</para>
  76. <section>
  77. <title>Two-Stage Save</title>
  78. <para>To prevent data loss in the unlikely case that jEdit should
  79. crash in the middle of saving a file, files are first saved to a
  80. temporary file named
  81. <filename>#<replaceable>filename</replaceable>#save#</filename>. If
  82. this operation is successful, the original file is replaced with the
  83. temporary file.</para>
  84. <para>However, in some situations, this behavior is undesirable. For
  85. example, on Unix this creates a new i-node so while jEdit retains
  86. file permissions, the owner and group of the file are reset, and if
  87. it is a hard link the link is broken. The <quote>two-stage
  88. save</quote> feature can be disabled in the
  89. <guibutton>General</guibutton> pane of the
  90. <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global
  91. Options</guimenuitem> dialog box; see <xref
  92. linkend="general-pane" />.</para>
  93. </section>
  94. <section id="autosave">
  95. <title>Autosave and Crash Recovery</title>
  96. <para>The autosave feature protects your work from computer crashes
  97. and such. Every 30 seconds, all buffers with unsaved changes are
  98. written out to their respective file names, enclosed in hash
  99. (<quote>#</quote>) characters. For example,
  100. <filename>program.c</filename> will be autosaved to
  101. <filename>#program.c#</filename>.</para>
  102. <para>Saving a buffer using one of the commands in the previous
  103. section automatically deletes the autosave file, so they will only
  104. ever be visible in the unlikely event of a jEdit (or operating
  105. system) crash.</para>
  106. <para>If an autosave file is found while a buffer is being loaded,
  107. jEdit will offer to recover the autosaved data.</para>
  108. <para>The autosave interval can be changed in the
  109. <guibutton>Autosave and Backup</guibutton> pane of the
  110. <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global
  111. Options</guimenuitem> dialog box; see <xref
  112. linkend="autosave-backups-pane" />.</para>
  113. </section>
  114. <section id="backups">
  115. <title>Backups</title>
  116. <para>The backup feature can be used to roll back to the previous
  117. version of a file after changes were made. When a buffer is saved
  118. for the first time after being opened, its original contents are
  119. <quote>backed up</quote> under a different file name.</para>
  120. <para>The behavior of the backup feature is specified in the
  121. <guibutton>Autosave and Backup</guibutton> pane of the
  122. <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global
  123. Options</guimenuitem> dialog box; see <xref
  124. linkend="autosave-backups-pane" />.`</para>
  125. <para>The default behavior is to back up the original contents to
  126. the buffer's file name suffixed with a tilde (<quote>~</quote>). For
  127. example, a file named <filename>paper.tex</filename> is backed up to
  128. <filename>paper.tex~</filename>.</para>
  129. <itemizedlist>
  130. <listitem>
  131. <para>The <guilabel>Max number of backups</guilabel> setting
  132. determines the number of backups to save. Setting this to
  133. zero disables the backup feature. Settings this to more than
  134. one adds numbered suffixes to file names. By default only
  135. one backup is saved.</para>
  136. </listitem>
  137. <listitem>
  138. <para>If the <guilabel>Backup directory</guilabel> setting
  139. is non-empty, backups are saved in that location (with the
  140. full path to the original file under it). Otherwise,
  141. they are saved in the same directory as the original file.
  142. The latter is the default behavior.</para>
  143. </listitem>
  144. <listitem>
  145. <para>The <guilabel>Backup filename prefix</guilabel>
  146. setting is the prefix that is added to the backed-up file
  147. name. This is empty by default.</para>
  148. </listitem>
  149. <listitem>
  150. <para>The <guilabel>Backup filename suffix</guilabel>
  151. setting is the suffix that is added to the backed-up file
  152. name. This is <quote>~</quote> by default.</para>
  153. </listitem>
  154. <listitem>
  155. <para>Backups can optionally be saved in a specified backup
  156. directory, instead of the directory of the original file.
  157. This can reduce clutter.</para>
  158. </listitem>
  159. <listitem>
  160. <para>The <guilabel>Backup on every save</guilabel> option
  161. is off by default, which results in a backup only being
  162. created the first time a buffer is saved in an editing
  163. session. If switched on, backups are created every time a
  164. buffer is saved.</para>
  165. </listitem>
  166. </itemizedlist>
  167. </section>
  168. </section>
  169. <section id="line-separators">
  170. <title>Line Separators</title>
  171. <para>Unix systems use newlines (<literal>\n</literal>) to mark line
  172. endings in text files. The MacOS uses carriage-returns
  173. (<literal>\r</literal>). Windows uses a carriage-return followed by a
  174. newline (<literal>\r\n</literal>). jEdit can read and write files in all
  175. three formats.</para>
  176. <para>The line separator used by the in-memory representation of file
  177. contents is always the newline character. When a file is being loaded,
  178. the line separator used in the file on disk is stored in a per-buffer
  179. property, and all line-endings are converted to newline characters for
  180. the in-memory representation. When the buffer is consequently saved, the
  181. value of the property replaces newline characters when the buffer is
  182. saved to disk.</para>
  183. <para>There are several ways to change a buffer's line separator:</para>
  184. <itemizedlist>
  185. <listitem>
  186. <para>In the <guimenu>Utilities</guimenu>&gt;<guimenuitem>Buffer
  187. Options</guimenuitem> dialog box. See <xref
  188. linkend="buffer-opts" />.</para>
  189. </listitem>
  190. <listitem>
  191. <para>By clicking the line separator indicator in the status
  192. bar. See <xref linkend="status-bar" />.</para>
  193. </listitem>
  194. <listitem>
  195. <para>From the keyboard, if a keyboard shortcut has been
  196. assigned to the <guimenuitem>Toggle Line Separator</guimenuitem>
  197. command in the <guibutton>Shortcuts</guibutton> pane of the
  198. <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global
  199. Options</guimenuitem> dialog box. By default, this command does
  200. not have a keyboard shortcut.</para>
  201. </listitem>
  202. </itemizedlist>
  203. <para>By default, new files are saved with your operating system's
  204. native line separator. This can be changed in the
  205. <guibutton>Encodings</guibutton> pane of the
  206. <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global
  207. Options</guimenuitem> dialog box; see <xref linkend="encodings-pane" />.
  208. Note that changing this setting has no effect on existing files.</para>
  209. </section>
  210. <section id="encodings">
  211. <title>Character Encodings</title>
  212. <para>A character encoding is a mapping from a set of characters to
  213. their on-disk representation. jEdit can use any encoding supported by
  214. the Java platform.</para>
  215. <para>Buffers in memory are always stored in <literal>UTF-16</literal>
  216. encoding, which means each character is mapped to an integer between 0
  217. and 65535. <literal>UTF-16</literal> is the native encoding supported by
  218. Java, and has a large enough range of characters to support most modern
  219. languages.</para>
  220. <para>When a buffer is loaded, it is converted from its on-disk
  221. representation to <literal>UTF-16</literal> using a specified
  222. encoding.</para>
  223. <para>The default encoding, used to load files for which no other
  224. encoding is specified, can be set in the
  225. <guibutton>Encodings</guibutton> pane of the
  226. <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global
  227. Options</guimenuitem> dialog box; see <xref linkend="encodings-pane" />.
  228. Unless you change this setting, it will be your operating system's
  229. native encoding, for example <literal>MacRoman</literal> on the MacOS,
  230. <literal>windows-1252</literal> on Windows, and
  231. <literal>ISO-8859-1</literal> on Unix.</para>
  232. <para>An encoding can be explicitly set when opening a file in the file
  233. system browser's
  234. <guimenu>Commands</guimenu>&gt;<guisubmenu>Encoding</guisubmenu>
  235. menu.</para>
  236. <para>It is also possible to override the encoding for a file in a
  237. jEdit "buffer-local" property at the top of the file. See
  238. <xref linkend="buffer-local" /> for more details. </para>
  239. <para>Note that there is no general way to auto-detect the encoding used
  240. by a file, however jEdit supports "encoding detectors", of which there
  241. are 4 in the core, and others can be provided by plugins through the
  242. services api. From the encodings option pane <xref linkend="encodings-pane"/>, you can customize which
  243. ones are used, and the order they are tried. Here are some of the
  244. encoding detectors recognized by jEdit: </para>
  245. <itemizedlist>
  246. <listitem>
  247. <para> <emphasis role="bold">BOM</emphasis>: <literal>UTF-16</literal> and <literal>UTF-8Y</literal>
  248. files are auto-detected, because they begin with a certain fixed
  249. character sequence. Note that plain UTF-8 does not mandate a
  250. specific header, and thus cannot be auto-detected, unless the
  251. file in question is an XML file.</para>
  252. </listitem>
  253. <listitem>
  254. <para> <emphasis role="bold">XML-PI</emphasis>:
  255. Encodings used in XML files with an XML PI like the
  256. following are auto-detected:</para>
  257. <programlisting>&lt;?xml version="1.0" encoding="UTF-8"&gt;</programlisting>
  258. </listitem>
  259. <listitem>
  260. <para> <emphasis role="bold">html</emphasis>:
  261. Encodings specified in HTML files with a <literal>content=</literal> attribute in a <literal>meta</literal> element may be auto-detected:</para>
  262. <programlisting>&lt;html&gt;&lt;head&gt;&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt; </programlisting>
  263. </listitem>
  264. <listitem> <para> <emphasis role="bold">python</emphasis>:
  265. Python has its own way of specifying encoding at the top of
  266. a file.</para>
  267. <programlisting># -*- coding: utf-8 -*- </programlisting>
  268. </listitem>
  269. </itemizedlist>
  270. <para>The encoding that will be used to save the current buffer is shown
  271. in the status bar, and can be changed in the
  272. <guimenu>Utilities</guimenu>&gt;<guimenuitem>Buffer
  273. Options</guimenuitem> dialog box. Note that changing this setting has no
  274. effect on the buffer's contents; if you opened a file with the wrong
  275. encoding and got garbage, you will need to reload it.
  276. <guimenu>File</guimenu>&gt;<guimenuitem>Reload with
  277. Encoding</guimenuitem> is an easy way.</para>
  278. <para>If a file is opened without an explicit encoding specified and it
  279. appears in the recent file list, jEdit will use the encoding last used
  280. when working with that file; otherwise the default encoding will be
  281. used.</para>
  282. <section>
  283. <title>Commonly Used Encodings</title>
  284. <para>While the world is slowly converging on UTF-8 and UTF-16
  285. encodings for storing text, a wide range of older encodings are
  286. still in widespread use and Java supports most of them.</para>
  287. <para>The simplest character encoding still in use is ASCII, or
  288. <quote>American Standard Code for Information Interchange</quote>.
  289. ASCII encodes Latin letters used in English, in addition to numbers
  290. and a range of punctuation characters. Each ASCII character consists
  291. of 7 bits, there is a limit of 128 distinct characters, which makes
  292. it unsuitable for anything other than English text. jEdit will load
  293. and save files as ASCII if the <literal>US-ASCII</literal> encoding
  294. is used.</para>
  295. <para>Because ASCII is unsuitable for international use, most
  296. operating systems use an 8-bit extension of ASCII, with the first
  297. 128 values mapped to the ASCII characters, and the rest used to
  298. encode accents, umlauts, and various more esoteric used
  299. typographical marks. The three major operating systems all extend
  300. ASCII in a different way. Files written by Macintosh programs can be
  301. read using the <literal>MacRoman</literal> encoding; Windows text
  302. files are usually stored as <literal>windows-1252</literal>. In the
  303. Unix world, the <literal>8859_1</literal> character encoding has
  304. found widespread usage.</para>
  305. <para>On Windows, various other encodings, referred to as
  306. <firstterm>code pages</firstterm> and identified by number, are used
  307. to store non-English text. The corresponding Java encoding name is
  308. <literal>windows-</literal> followed by the code page number, for
  309. example <literal>windows-850</literal>.</para>
  310. <para>Many common cross-platform international character sets are
  311. also supported; <literal>KOI8_R</literal> for Russian text,
  312. <literal>Big5</literal> and <literal>GBK</literal> for Chinese, and
  313. <literal>SJIS</literal> for Japanese.</para>
  314. </section>
  315. </section>
  316. <section id="vfs-browser">
  317. <title>The File System Browser (FSB)</title>
  318. <para><guimenu>Utilities</guimenu>&gt;<guimenuitem>File System
  319. Browser</guimenuitem> displays the file system browser. By default, the
  320. file system browser is shown in a floating window. This window can be
  321. docked using the commands in its top-left corner popup menu; see <xref
  322. linkend="docking" />.</para>
  323. <para>The FSB can be customized in the
  324. <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global
  325. Options</guimenuitem> dialog box; see <xref
  326. linkend="vfs-browser-pane" />.</para>
  327. <section>
  328. <title>Navigating the File System</title>
  329. <para>The directory to browse is specified in the
  330. <guibutton>Path</guibutton> text field. Clicking the mouse in the
  331. text field automatically selects its contents allowing a new path to
  332. be quickly typed in. If a relative path is entered, it will be
  333. resolved relative to the current path. This text field remembers
  334. previously entered strings; see <xref linkend="history" />. The same
  335. list of previously browsed directories is also listed in the
  336. <guimenu>Utilities</guimenu>&gt;<guisubmenu>Recent
  337. Directories</guisubmenu> menu; selecting one opens it in the file
  338. system browser.</para>
  339. <para>To browse a listed directory, double-click it (or if you have
  340. a three-button mouse, you can click the middle mouse button as
  341. well). Alternatively, click the disclosure widget next to a
  342. directory to list its contents in place. To browse higher up in the
  343. directory hierarchy, double-click one of the parent directories in
  344. the parent directory list.</para>
  345. <para>Files and directories in the file list are shown in different
  346. colors depending on what glob patterns their names match. The
  347. patterns and colors can be customized in the <guibutton>File System
  348. Browser</guibutton>&gt;<guibutton>Colors</guibutton> pane of the
  349. <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global
  350. Options</guimenuitem> dialog box.</para>
  351. <para>The <guibutton>Path:</guibutton> Text Box can be used to
  352. navigate to a specific directory. Environment variables are expanded
  353. here, allowing for both <literal>$VARNAME</literal> or
  354. <literal>%VARNAME%</literal> syntax. </para>
  355. <para> <literal>A+Up</literal> is a keyboard shortcut that brings
  356. you to the parent directory. </para>
  357. <para> <literal>A+Left</literal> and <literal>A+Right</literal> navigate back and forward through the visited directory stacks, in a
  358. Netscape/Konqueror/IE like fashion. </para>
  359. <para>To see a specific set of files only (for example, those whose
  360. names end with <filename>.java</filename>), enter a glob pattern in
  361. the <guibutton>Filter</guibutton> text field. This text fields
  362. remembers previously entered strings. See <xref linkend="globs" />
  363. for information about glob patterns.</para>
  364. <para>Unopened files can be opened by double-clicking (or by
  365. clicking the middle mouse button). Open files have their names
  366. underlined, and can be selected by single-clicking. Holding down
  367. <keycap>Shift</keycap> while opening a file will open it in a new
  368. view.</para>
  369. <para>Clicking a file or directory with the right mouse button
  370. displays a popup menu containing various commands.
  371. <!-- Note that attempting to delete a directory containing files will give an error; only empty directories can be deleted. -->
  372. </para>
  373. <tip>
  374. <para>The file list sorting algorithm used in jEdit handles
  375. numbers in file names in an intelligent manner. For example, a
  376. file named <filename>section10.xml</filename> will be placed
  377. after a file named <filename>section5.xml</filename>. A
  378. conventional letter-by-letter sort would have placed these two
  379. files in the wrong order.</para>
  380. </tip>
  381. </section>
  382. <section>
  383. <title>The Tool Bar</title>
  384. <para>The file system browser has a tool bar containing a number of
  385. buttons. Each item in the <guibutton>Commands</guibutton> menu
  386. (described below) except <guimenuitem>Show Hidden
  387. Files</guimenuitem> and <guisubmenu>Encoding</guisubmenu> has a
  388. corresponding tool bar button.</para>
  389. </section>
  390. <section>
  391. <title>The Commands Menu</title>
  392. <para>Clicking the <guibutton>Commands</guibutton> button displays a
  393. menu containing the following items:</para>
  394. <itemizedlist>
  395. <listitem>
  396. <para><guimenuitem>Parent Directory</guimenuitem> - moves up
  397. in the directory hierarchy. The Alt+Left arrow keyboard shortcut achieves the same thing. </para>
  398. </listitem>
  399. <listitem>
  400. <para><guimenuitem>Reload Directory</guimenuitem> - reloads
  401. the file list from disk. F5 does this also. </para>
  402. </listitem>
  403. <listitem>
  404. <para><guimenuitem>Root Directory</guimenuitem> - on Unix,
  405. goes to the root directory (<filename>/</filename>). On
  406. Windows and MacOS X, lists all mounted drives and network
  407. shares. The forward slash (/) achieves this too. </para>
  408. </listitem>
  409. <listitem>
  410. <para><guimenuitem>Home Directory</guimenuitem> - displays
  411. your home directory. Keyboard shortcut: ~ </para>
  412. </listitem>
  413. <listitem>
  414. <para><guimenuitem>Directory of Current Buffer</guimenuitem>
  415. - displays the directory containing the currently active
  416. buffer. Shortcut: - </para>
  417. </listitem>
  418. <listitem>
  419. <para><guimenuitem>New File</guimenuitem> (Ctrl+N) - opens new, empty, buffer in the current directory. The file will not actually be created on disk until the buffer is
  420. saved.</para>
  421. </listitem>
  422. <listitem>
  423. <para><guimenuitem>New Directory</guimenuitem> - creates a
  424. new directory after prompting for the desired name.</para>
  425. </listitem>
  426. <listitem>
  427. <para><guimenuitem>Search in Directory</guimenuitem> -
  428. displays the search and replace dialog box set to search all
  429. files in the current directory. If a file is selected when
  430. this command is invoked, its extension becomes the file name
  431. filter for the search; otherwise, the file name filter
  432. entered in the browser is used. See <xref
  433. linkend="search-replace" /> for details.</para>
  434. </listitem>
  435. <listitem>
  436. <para><guimenuitem>Show Hidden Files</guimenuitem> - toggles
  437. if hidden files are to be shown in the file list.</para>
  438. </listitem>
  439. <listitem>
  440. <para><guisubmenu>Encoding</guisubmenu> - a menu for
  441. selecting the character encoding to use when opening files.
  442. See <xref linkend="encodings" />.</para>
  443. </listitem>
  444. </itemizedlist>
  445. </section>
  446. <section>
  447. <title>The Plugins Menu</title>
  448. <para>Clicking the <guibutton>Plugins</guibutton> button displays a
  449. menu containing plugin commands. For information about plugins, see
  450. <xref linkend="using-plugins" />.</para>
  451. </section>
  452. <section>
  453. <title>The Favorites Menu</title>
  454. <para>Clicking the <guibutton>Favorites</guibutton> button displays
  455. a menu showing all files and directories in the favorites list. The
  456. <guimenuitem>Add to Favorites</guimenuitem> item adds the currently
  457. selected file to the favorites list. If nothing is selected, the
  458. current directory is added. To remove a file from the favorites,
  459. invoke <guimenuitem>Edit Favorites</guimenuitem>, which will show
  460. the favorites list in the file system view, then select
  461. <guimenuitem>Delete</guimenuitem> from the right-click menu of the
  462. entry you want to remove.</para>
  463. </section>
  464. <section>
  465. <title>Keyboard Shortcuts</title>
  466. <para>Completion behaves differently in file dialogs than in the
  467. stand-alone file system browser window.</para>
  468. <para>In the file dialog, keyboard input goes in the file name field
  469. by default. Pressing <keycap>Enter</keycap> opens the file or
  470. directory path that is either fully or partially entered in the file
  471. name field. Typing the first few characters of a file's name selects
  472. that file. If the file name field is empty and nothing is selected,
  473. <keycap>/</keycap> lists the root directory on Unix and the list of
  474. drives on Windows. There are two handy abbreviations that may be
  475. used in file paths: <keycap>~</keycap> expands to the home
  476. directory, and <keycap>-</keycap> expands to the current buffer's
  477. directory.</para>
  478. <para>For example, to open a file
  479. <filename>/home/slava/jEdit/doc/TODO.txt</filename>, you might enter
  480. <filename>~/j/d/to</filename>.</para>
  481. <para>In the stand-alone file system browser, keyboard input is
  482. handled slightly differently. There is no file name field, instead
  483. shortcuts are active when the file tree has keyboard focus.
  484. Additionally, pressing <keycap>/</keycap>, <keycap>~</keycap> or
  485. <keycap>-</keycap> always immediately goes to the root, home and
  486. current buffer's directory, respectively.</para>
  487. </section>
  488. </section>
  489. <section id="reloading">
  490. <title>Reloading From Disk</title>
  491. <para>When a view is brought to the foreground, jEdit checks if any open
  492. buffers were modified on disk by another application. All affected
  493. buffers are listed in a dialog box. By default, buffers without unsaved
  494. changes are automatically reloaded. This feature can be disabled, or
  495. changed to prompt if files should be reloaded first, in the
  496. <guibutton>General</guibutton> pane of the
  497. <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global
  498. Options</guimenuitem> dialog box; see <xref
  499. linkend="global-opts" />.</para>
  500. <para><guimenu>File</guimenu>&gt;<guimenuitem>Reload</guimenuitem> can
  501. be used to reload the current buffer from disk at any other time; a
  502. confirmation dialog box will be displayed first if the buffer has
  503. unsaved changes.</para>
  504. <para><guimenu>File</guimenu>&gt;<guimenuitem>Reload All</guimenuitem>
  505. discards unsaved changes in all open buffers and reload them from disk,
  506. asking for confirmation first.</para>
  507. </section>
  508. <section id="threaded-io">
  509. <title>Multi-Threaded I/O</title>
  510. <para>To improve responsiveness and perceived performance, jEdit
  511. executes all buffer input/output operations asynchronously. While I/O is
  512. in progress, the status bar displays the number of remaining I/O
  513. operations.</para>
  514. <para>The
  515. <guimenu>Utilities</guimenu>&gt;<guisubmenu>Troubleshooting</guisubmenu>&gt;
  516. <guimenuitem>Task Monitor</guimenuitem> command displays a window with more
  517. detailed status information and progress meters. By default, the
  518. <guimenuitem>Task Monitor</guimenuitem> is shown in a floating
  519. window. This window can be docked using the commands in its top-left
  520. corner popup menu; see <xref linkend="docking" />. I/O requests can also
  521. be aborted in this window, however note that aborting a buffer save can
  522. result in data loss.</para>
  523. <!-- <para>
  524. By default, four I/O threads are created, which means that up
  525. to four buffers can be loaded or saved simultaneously. The number of
  526. threads can be changed in the
  527. <guibutton>Loading and Saving</guibutton> pane of the
  528. <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global Options</guimenuitem>
  529. dialog box; see <xref linkend="global-opts" />. Setting the number to zero
  530. disables multi-threaded I/O completely; doing this is not recommended.
  531. </para> -->
  532. </section>
  533. <section id="printing">
  534. <title>Printing</title>
  535. <para><guimenu>File</guimenu>&gt;<guimenuitem>Print</guimenuitem>
  536. (shortcut: <keycap>C+p</keycap>) prints the current buffer.</para>
  537. <para><guimenu>File</guimenu>&gt;<guimenuitem>Page Setup</guimenuitem>
  538. displays a dialog box for changing your operating system's print
  539. settings, such as margins, page size, print quality, and so on.</para>
  540. <para>The print output can be customized in the
  541. <guibutton>Printing</guibutton> pane of the
  542. <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global
  543. Options</guimenuitem> dialog box; see <xref linkend="printing-pane" />.
  544. The following settings can be changed:</para>
  545. <itemizedlist>
  546. <listitem>
  547. <para>The font to use when printing.</para>
  548. </listitem>
  549. <listitem>
  550. <para>If a header with the file name should be printed on each
  551. page.</para>
  552. </listitem>
  553. <listitem>
  554. <para>If a footer with the page number and current date should
  555. be printed on each page.</para>
  556. </listitem>
  557. <listitem>
  558. <para>If line numbers should be printed.</para>
  559. </listitem>
  560. <listitem>
  561. <para>If the output should be color or black and white.</para>
  562. </listitem>
  563. <listitem>
  564. <para>The tab size to use when printing - this will usually be
  565. less than the text area tab size, to conserve space in the
  566. printed output.</para>
  567. </listitem>
  568. <listitem>
  569. <para>If folded regions should be printed.</para>
  570. </listitem>
  571. </itemizedlist>
  572. </section>
  573. <section id="closing-exiting">
  574. <title>Closing Files and Exiting jEdit</title>
  575. <para><guimenu>File</guimenu>&gt;<guimenuitem>Close</guimenuitem>
  576. (shortcut: <keycap>C+w</keycap>) closes the current buffer. If it has
  577. unsaved changes, jEdit will ask if they should be saved first.</para>
  578. <para><guimenu>File</guimenu>&gt;<guimenuitem>Close All</guimenuitem>
  579. (shortcut: <keycap>C+e C+w</keycap>) closes all buffers. If any buffers
  580. have unsaved changes, they will be listed in a dialog box where they can
  581. be saved or discarded. In the dialog box, multiple buffers to operate on
  582. at once can be selected by clicking on them in the list while holding
  583. down <keycap>Control</keycap>. After all buffers have been closed, a new
  584. untitled buffer is opened.</para>
  585. <para><guimenu>File</guimenu>&gt;<guimenuitem>Exit</guimenuitem>
  586. (shortcut: <keycap>C+q</keycap>) will completely exit jEdit, prompting
  587. if unsaved buffers should be saved first.</para>
  588. </section>
  589. </chapter>