PageRenderTime 144ms CodeModel.GetById 80ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 1ms


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