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