/usr/share/doc/nedit/html/preferences.html is in nedit 1:5.6a-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <HTML>
<HEAD>
<TITLE> Customizing </TITLE>
</HEAD>
<BODY>
<A NAME="Preferences"></A>
<H2> Preferences </H2>
<P>
The Preferences menu allows you to set options for both the current editing
window, and default values for newly created windows and future NEdit
sessions. Options in the Preferences menu itself (not in the Default
Settings sub-menu) take effect immediately and refer to the current window
only. Options in the Default Settings sub-menu provide initial settings for
future windows created using the New or Open commands; options affecting all
windows are also set here.
</P><P>
Preferences set in the Default Settings sub-menu are saved in a file that
NEdit reads at startup time, cf. <A HREF="#automatically">Autoload Files</A>, by selecting Save Defaults.
</P><P>
<H3>Preferences Menu</H3>
</P><P>
<PRE>
<B>Default Settings</B>
</PRE>
Menu of initial settings for future windows. Generally the same as the
options in the main part of the menu, but apply as defaults for future
windows created during this NEdit session. These settings can be saved using
the Save Defaults command below, to be loaded automatically each time NEdit
is started.
</P><P>
<PRE>
<B>Save Defaults</B>
</PRE>
Save the default options as set under Default Settings for future NEdit
sessions.
</P><P>
<PRE>
<B>Statistics Line</B>
</PRE>
Show the full file name, line number, and length of the file being edited.
</P><P>
<PRE>
<B>Incremental Search Line</B>
</PRE>
Keep the incremental search bar (Search -> Find Incremental) permanently
displayed at the top of the window.
</P><P>
<PRE>
<B>Show Line Numbers</B>
</PRE>
Display line numbers to the right of the text.
</P><P>
<PRE>
<B>Language Mode</B>
</PRE>
Tells NEdit what language (if any) to assume, for selecting language-specific
features such as highlight patterns and smart indent macros, and setting
language specific preferences like word delimiters, tab emulation, and
auto-indent. See <A HREF="programmer.html#Programming_with_NEdit">Programming with NEdit</A> for more information.
</P><P>
<PRE>
<B>Auto Indent</B>
</PRE>
Setting Auto Indent "on" maintains a running indent (pressing the Return key
will line up the cursor with the indent level of the previous line). If
smart indent macros are available for the current language mode, smart indent
can be selected and NEdit will attempt to guess proper language indentation
for each new line, cf. <A HREF="indent.html#Auto/Smart_Indent">Auto/Smart Indent</A>.
</P><P>
<PRE>
<B>Wrap</B>
</PRE>
Choose between two styles of automatic wrapping or none. Auto Newline wrap,
wraps text at word boundaries when the cursor reaches the right margin, by
replacing the space or tab at the last word boundary with a newline
character. Continuous Wrap wraps long lines which extend past the right
margin. Continuous Wrap mode is typically used to produce files where
newlines are omitted within paragraphs, to make text filling automatic (a
kind of poor-man's word processor). Text of this style is common on Macs and
PCs but is not necessarily supported very well under Unix (except in programs
which deal with e-mail, for which it is often the format of choice).
</P><P>
<PRE>
<B>Wrap Margin</B>
</PRE>
Set margin for Auto Newline Wrap, Continuous Wrap, and Fill Paragraph. Lines
may, be wrapped at the right margin of the window, or the margin can be set
at a specific column.
</P><P>
<PRE>
<B>Tab Stops</B>
</PRE>
Set the tab distance (number of characters between tab stops) for tab
characters, and control tab emulation and use of tab characters in padding
and emulated tabs.
</P><P>
<PRE>
<B>Text Font...</B>
</PRE>
Change the font(s) used to display text (fonts for menus and dialogs must be
set using X resources for the text area of the window). See below for more
information.
</P><P>
<PRE>
<B>Highlight Syntax</B>
</PRE>
If NEdit recognizes the language being edited, and highlighting patterns are
available for that language, use fonts and colors to enhance viewing of the
file. (See <A HREF="syntax.html#Syntax_Highlighting">Syntax Highlighting</A> for more information.)
</P><P>
<PRE>
<B>Make Backup Copy</B>
</PRE>
On Save, write a backup copy of the file as it existed before the Save
command with the extension .bck (Unix only).
</P><P>
<PRE>
<B>Incremental Backup</B>
</PRE>
Periodically make a backup copy of the file being edited under the name
`~filename` on Unix or `_filename` on VMS (see <A HREF="recovery.html#Crash_Recovery">Crash Recovery</A>).
</P><P>
<PRE>
<B>Show Matching (..)</B>
</PRE>
Momentarily highlight matching parenthesis, brackets, and braces, or the
range between them, when one of these characters is typed, or when the
insertion cursor is positioned after it. Delimiter only highlights the
matching delimiter, while Range highlights the whole range of text between
the matching delimiters.
</P><P>
Optionally, the matching can make use of syntax information if syntax
highlighting is enabled. Alternatively, the matching is purely character
based. In general, syntax based matching results in fewer false matches.
</P><P>
<PRE>
<B>Overtype</B>
</PRE>
In overtype mode, new characters entered replace the characters in front of
the insertion cursor, rather than being inserted before them.
</P><P>
<PRE>
<B>Read Only</B>
</PRE>
Lock the file against accidental modification. This temporarily prevents the
file from being modified in this NEdit session. Note that this is different
from setting the file protection.
</P><P>
<H3>Preferences -> Default Settings Menu</H3>
</P><P>
Options in the Preferences -> Default Settings menu have the same meaning as
those in the top-level Preferences menu, except that they apply to future
NEdit windows and future NEdit sessions if saved with the Save Defaults
command. Additional options which appear in this menu are:
</P><P>
<PRE>
<B>Language Modes</B>
</PRE>
Define language recognition information (for determining language mode from
file name or content) and set language specific preferences.
</P><P>
<PRE>
<B>Tag Collisions</B>
</PRE>
How to react to multiple tags for the same name. Tags are described in the
section: <A HREF="tags.html#Finding_Declarations_(ctags)">Finding Declarations (ctags)</A>. In Show All mode, all matching tags
are displayed in a dialog. In Smart mode, if one of the matching tags is in
the current window, that tag is chosen, without displaying the dialog.
</P><P>
<PRE>
<B>Command Shell...</B>
</PRE>
Set the shell used to run programs from the shell_command() macro function
and from the Shell menu. This defaults to the user's login shell.
</P><P>
<PRE>
<B>Colors...</B>
</PRE>
Change the colors used to display text. The "Matching (..)" fields change the
colors that matching parens, brackets and braces are flashed when the "Show
Matching (..)" option is enabled. Note that the foreground colors for plain
text, selected text, and matching paren flashing only apply when syntax
highlighting is disabled. When syntax highlighting is enabled, text (even
text that appears plain) will always be colored according to its highlighting
style. (For information on changing syntax highlighting styles and matching
patterns use see <A HREF="syntax.html#Syntax_Highlighting">Syntax Highlighting</A>.)
</P><P>
<PRE>
<B>Customize Menus</B>
</PRE>
Add/remove items from the Shell, Macro, and window background menus (see
below).
</P><P>
<PRE>
<B>Customize Window Title</B>
</PRE>
Opens a dialog where the information to be displayed in the window's title
field can be defined and tested. The dialog contains a Help button, providing
further information about the options available.
</P><P>
<PRE>
<B>Searching</B>
</PRE>
Options for controlling the behavior of Find and Replace commands:
</P><P>
<I>Verbose</I> -
Presents search results in dialog form, asks before wrapping a
search back around the beginning (or end) of the file
(unless Beep On Search Wrap is turned on).
</P><P>
<I>Wrap Around</I> -
Search and Replace operations wrap around the beginning (or end) of the file.
</P><P>
<I>Beep On Search Wrap</I> -
Beep when Search and Replace operations wrap around the beginning (or end) of
the file (only if Wrap Around is turned on).
</P><P>
<I>Keep Dialogs Up</I> -
Don't pop down Replace and Find boxes after searching.
</P><P>
<I>Default Search Style</I> -
Initial setting for search type in Find and Replace dialogs.
</P><P>
<I>Default Replace Scope</I> -
[THIS OPTION IS ONLY PRESENT WHEN NEDIT WAS COMPILED WITH THE
<PRE>
-DREPLACE_SCOPE FLAG TO SELECT AN ALTERNATIVE REPLACE DIALOG LAYOUT.]
</PRE>
</P><P>
Initial setting for the scope in the Replace/Find dialog, when a selection
exists. It can be either "In Window", "In Selection", or "Smart". "Smart"
results in "In Window" if the size of the selection is smaller than 1 line,
and to "In Selection" otherwise.
</P><P>
<PRE>
<B>Syntax Highlighting</B>
</PRE>
Program and configure enhanced text display for new or supported languages.
(See <A HREF="syntax.html#Syntax_Highlighting">Syntax Highlighting</A>.)
</P><P>
<PRE>
<B>Tabbed Editing</B>
</PRE>
Options for controlling the tabbed interface:
</P><P>
<I>Open File in New Tab</I> -
Open files in new tabs, else open files in new windows.
</P><P>
<I>Show Tab Bar</I> -
Show/Hide the tab bar.
</P><P>
<I>Hide Tab Bar when only one Document is open</I>
</P><P>
<I>Next/Prev Tabs Across Windows</I> -
Suppose there are two windows with three tabs in the first window and two tabs in
the second window. Enabling this option, if you are on the third tab in the
first window, hitting Ctrl+PageDown would switch to the first tab in the second
window (instead of switching to the first tab in the first window).
</P><P>
<I>Sort Tabs Alphabetically</I>
</P><P>
<PRE>
<B>Show Tooltips</B>
</PRE>
Show file name and path in a tooltip when moving the mouse pointer over a tab.
(See <A HREF="interface.html#Tabbed_Editing">Tabbed Editing</A>.)
</P><P>
<PRE>
<B>Terminate with Line Break on Save</B>
</PRE>
Some UNIX tools expect that files end with a line feed. If this option is
activated, NEdit will append one if required.
</P><P>
<PRE>
<B>Sort Open Prev. Menu</B>
</PRE>
Option to order the File -> Open Previous menu alphabetically, versus in
order of last access.
</P><P>
<PRE>
<B>Popups Under Pointer</B>
</PRE>
Display pop-up dialogs centered on the current mouse position, as opposed to
centered on the parent window. This generally speeds interaction, and is
essential for users who set their window managers so keyboard focus
follows the mouse.
</P><P>
<PRE>
<B>Auto-Scroll Near Window Top/Bottom</B>
</PRE>
When this option is enabled the window will automatically scroll when the
cursor comes 4 lines from the top or bottom of the window (except at the
beginning of the file). The number of lines can be customized with the
nedit.autoScrollVPadding resource.
</P><P>
<PRE>
<B>Warnings</B>
</PRE>
Options for controlling the popping up of warning dialogs:
</P><P>
<I>File Modified Externally</I> -
Pop up a warning dialog when files get changed external to NEdit.
</P><P>
<I>Check Modified File Contents</I> -
If external file modification warnings are requested, also check the file
contents iso. only the modification date.
</P><P>
<I>On Exit</I> -
Ask before exiting when two or more files are open in an NEdit session
or before closing a window with two or more tabs.
</P><P>
<PRE>
<B>Initial Window Size</B>
</PRE>
Default size for new windows.
</P><P>
<H3>Changing Font(s)</H3>
</P><P>
The font used to display text in NEdit is set under Preferences -> Text Font
(for the current window), or Preferences -> Default Settings Text Font (for
future windows). These dialogs also allow you to set fonts for syntax
highlighting. If you don't intend to use syntax highlighting, you can ignore
most of the dialog, and just set the field labeled Primary Font.
</P><P>
Unless you are absolutely certain about the types of files that you will be
editing with NEdit, you should choose a fixed-spacing font. Many, if not
most, plain-text files are written expecting to be viewed with fixed
character spacing, and will look wrong with proportional spacing. NEdit's
filling, wrapping, and rectangular operations will also work strangely if you
choose a proportional font.
</P><P>
Note that in the font browser (the dialog brought up by the Browse...
button), the subset of fonts which are shown is narrowed depending on the
characteristics already selected. It is therefore important to know that you
can unselect characteristics from the lists by clicking on the selected items
a second time.
</P><P>
Fonts for syntax highlighting should ideally match the primary font in both
height and spacing. A mismatch in spacing will result in similar distortions
as choosing a proportional font: column alignment will sometimes look wrong,
and rectangular operations, wrapping, and filling will behave strangely. A
mismatch in height will cause windows to re-size themselves slightly when
syntax highlighting is turned on or off, and increase the inter-line spacing
of the text. Unfortunately, on some systems it is hard to find sets of fonts
which match exactly in height.
</P><P>
<H3>Customizing Menus</H3>
</P><P>
You can add or change items in the Shell, Macro, and window background menus
under Preferences -> Default Settings -> Customize Menus. When you choose
one of these, you will see a dialog with a list of the current
user-configurable items from the menu on the left. To change an existing
item, select it from the list, and its properties will appear in the
remaining fields of the dialog, where you may change them. Selecting the
item "New" from the list allows you to enter new items in the menu.
</P><P>
Hopefully most of the characteristics are self explanatory, but here are a
few things to note:
</P><P>
Accelerator keys are keyboard shortcuts which appear on the right hand side
of the menus, and allow you avoid pulling down the menu and activate the
command with a single keystroke. Enter accelerators by typing the keys
exactly as you would to activate the command.
</P><P>
Mnemonics are a single letter which should be part of the menu item name,
which allow users to traverse and activate menu items by typing keys when the
menu is pulled down.
</P><P>
In the Shell Command field of the Shell Commands dialog, the % character
expands to the name (including directory path) of the file in the window. To
include a % character in the command, use %%.
</P><P>
The Menu Entry field can contain special characters for constructing
hierarchical sub-menus, and for making items which appear only in certain
language modes. The right angle bracket character ">" creates a sub-menu.
The name of the item itself should be the last element of the path formed
from successive sub-menu names joined with ">". Menu panes are called in to
existence simply by naming them as part of a Menu Entry name. To put several
items in the same sub-menu, repeat the same hierarchical sequence for each.
For example, in the Macro Commands dialog, two items with menu entries: a>b>c
and a>b>d would create a single sub menu under the macro menu called "a",
which would contain a single sub-menu, b, holding the actual items, c and d:
</P><P>
<PRE>
+---++---++---+
|a >||b >||c |
+---++---+|d |
+---+
</PRE>
</P><P>
To qualify a menu entry with a language mode, simply add an at-sign "@" at
the end of the menu command, followed (no space) by a language mode name. To
make a menu item which appears in several language modes, append additional
@s and language mode names. For example, an item with the menu entry:
</P><P>
<PRE>
Make C Prototypes@C@C++
</PRE>
</P><P>
would appear only in C and C++ language modes, and:
</P><P>
<PRE>
Make Class Template@C++
</PRE>
</P><P>
would appear only in C++ mode.
</P><P>
Menu items with no qualification appear in all language modes.
</P><P>
If a menu item is followed by the single language qualification "@*", that
item will appear only if there are no applicable language-specific items of
the same name in the same submenu. For example, if you have the following
three entries in the same menu:
</P><P>
<PRE>
Make Prototypes@C@C++
Make Prototypes@Java
Make Prototypes@*
</PRE>
</P><P>
The first will be available when the language mode is C or C++, the second
when the language mode is Java, and for all other language modes (including
the "Plain" non-language mode). If the entry:
</P><P>
<PRE>
Make Prototypes
</PRE>
</P><P>
also exists, this will always appear, meaning that the menu will always have
two "Make Prototypes" entries, whatever the language mode.
</P><P>
<H3>The NEdit Autoload Files</H3>
</P><P>
<A NAME="automatically"></A>
At startup time, NEdit automatically reads the preferences file
`nedit.rc', the autoload macro file `autoload.nm', and the history data base
`nedit.history'. The preferences file contains saved preferences (menu
settings) in the format of an X resource file. The autoload macro file is a
macro file containing macro commands and definitions that NEdit will
execute at startup. (NEdit doesn't create this file automatically.)
Moreover, NEdit saves a list of the recently opened files, which appear under
the Open Previous menu, in the history data base.
</P><P>
By default the location of these files is '$HOME/.nedit/'. A different
directory can be given by letting the environment variable NEDIT_HOME
point to it.
</P><P>
Notice that NEdit still supports the older names for these files, which are
`$HOME/.nedit', `$HOME/.neditmacro', and `$HOME/.neditdb', respectively. This
old naming scheme will be used if NEdit detects that `$HOME/.nedit' is a
regular file and NEDIT_HOME isn't set.
</P><P>
(For VMS, the location of these files is '$NEDIT_HOME/' if NEDIT_HOME is set,
and 'SYS$LOGIN:' otherwise.)
</P><P>
The contents of the preferences file can be moved into another X resource
file (see <A HREF="resources.html#X_Resources">X Resources</A>). One reason for doing so would be to attach server
specific preferences, such as a default font, to a particular X server.
Another reason for moving preferences into an X resource file would be to
keep preferences menu options and X resource settable options together in
one place. Though the files are the same format, additional resources
should not be added to the preferences file, since NEdit modifies that file
by overwriting it completely. Note also that the contents of the
preferences file takes precedence over the values in an X resource file.
Using Save Defaults after moving the contents of your preferences file to
your .Xdefaults file will re-create the preferences file, interfering with
the options that you have moved.
</P><P>
<H3>Sharing Customizations with Other NEdit Users</H3>
</P><P>
If you have written macro or shell menu commands, highlight patterns, or
smart-indent macros that you want to share with other NEdit users, you can
make a file which they can load into their NEdit environment.
</P><P>
To load such a file, start NEdit with the command:
</P><P>
<PRE>
nedit -import <file>
</PRE>
</P><P>
In the new NEdit session, verify that the imported patterns or macros do what
you want, then select Preferences -> Save Defaults. Saving incorporates the
changes into the NEdit preferences file, so the next time you run NEdit, you
will not have to import the distribution file.
</P><P>
Loading a customization file is automated, but creating one is not. To
produce a file to be imported by other users, you must make a copy of your own
preferences file, and edit it, by hand, to remove everything but the
few items of interest to the recipient. Leave only the individual
resource(s), and within those resources, only the particular macro, pattern,
style, etc, that you wish to exchange.
</P><P>
For example, to share a highlighting pattern set, you would include the
patterns, any new styles you added, and language mode information only if the
patterns are intended to support a new language rather than updating an
existing one. For example:
</P><P>
<PRE>
nedit.highlightPatterns:\
My Language:1:0{\n\
Comment:"#":"$"::Comment::\n\
Loop Header:"^[ \\t]*loop:":::Loop::\n\
}
nedit.languageModes: My Language:.my::::::
nedit.styles: Loop:blue:Bold
</PRE>
</P><P>
Resources are in the format of X resource files, but the format of text
within multiple-item resources like highlight patterns, language modes,
macros, styles, etc., are private to NEdit. Each resource is a string which
ends at the first newline character not escaped with \, so you must be
careful about how you treat ends of lines. While you can generally just cut
and paste indented sections, if something which was originally in the middle
of a resource string is now at the end, you must remove the \ line
continuation character(s) so it will not join the next line into the
resource. Conversely, if something which was originally at the end of a
resource is now in the middle, you'll have to add continuation character(s)
to make sure that the resource string is properly continued from beginning to
end, and possibly newline character(s) (\n) to make sure that it is properly
separated from the next item.
<P><HR>
</P><P>
</P>
</BODY>
</HTML>
|