PageRenderTime 132ms CodeModel.GetById 121ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms


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