Fix for SF bug #1067402: Error in syntax highlighting with sub-pattern.
[nedit.git] / doc / help.etx
blobb587063a36c83d6bb1824d77ef32b7af9fc925c7
1 .. $Id: help.etx,v 1.82 2004/11/26 18:25:47 edg Exp $
2 .. NOTE: Remember to supply 'version' variable on setext command line.
3 ..       For example,  setext -m -v "version=NEdit Version 6.0".
4 ..
5 .. The following are variable definitions for the various titles below
6 .. ----------------------------------------------------------------------------
7 .. |>title=Nirvana Editor (NEdit) Help Documentation<|
8 .. |>ttlMk==========================================<|
9 .. ----------------------------------------------------------------------------
10 .. ? NEDITDOC~
11                |>ttlMk<|
12                |>title<|
13                |>ttlMk<|
14                
15 |>version<|                                               |>Date<|
16 .. ~ NEDITDOC
18 .. ! NEDITDOC~
19 |>title<|
20 |>ttlMk<|
22 .. ? html~
24 .. .. This table of contents is only for the HTML version of this document.
26 Table of Contents
27 -----------------
29     Getting_Started_                    
30                                         
31     Basic Operation                     Macro/Shell Extensions
32       Selecting_Text_                      Shell_Commands_and_Filters_
33       Finding_and_Replacing_Text_          Learn/Replay_
34       Cut_and_Paste_                       Macro_Language_
35       Using_the_Mouse_                     Macro_Subroutines_
36       Keyboard_Shortcuts_                  Highlighting_Information_
37       Shifting_and_Filling_                Range_Sets_
38       Tabbed_Editing_                      Action_Routines_
39       File_Format_                         
40                                         Customizing
41     Features for Programming              Customizing_NEdit_
42       Programming_with_NEdit_              Preferences_
43       Tabs/Emulated_Tabs_                  X_Resources_
44       Auto/Smart_Indent_                   Key_Binding_
45       Syntax_Highlighting_                 Highlighting_Patterns_
46       Finding_Declarations_(ctags)_        Smart_Indent_Macros_
47       Calltips_
49     Regular Expressions                 NEdit_Command_Line_
50       Basic_Regular_Expression_Syntax_   Client/Server_Mode_
51       Metacharacters_                    Crash_Recovery_
52       Parenthetical_Constructs_          Version_
53       Advanced_Topics_                   GNU_General_Public_License_
54       Example_Regular_Expressions_       Mailing_Lists_
55                                         Problems/Defects_
57 .. ~ html
58 Getting Started
59 ---------------
61   Welcome to NEdit!
62 .. ~ NEDITDOC
63 .. .. What appears below will always print whether or not NEDITDOC is defined.
66   NEdit is a standard GUI (Graphical User Interface) style text editor for
67   programs and plain-text files.  Users of Macintosh and MS Windows based text
68   editors should find NEdit a familiar and comfortable environment.  NEdit
69   provides all of the standard menu, dialog, editing, and mouse support, as
70   well as all of the standard shortcuts to which the users of modern GUI based
71   environments are accustomed.  For users of older style Unix editors, welcome
72   to the world of mouse-based editing!
74 .. ? NEDITDOC~
75 ..   NEdit is freely distributed under the terms of the Gnu General Public
76 ..   License.
78 .. .. This stuff will always be invisible, unless NEDITDOC is defined
79 .. 
80 .. Installing NEdit
81 .. ----------------
82 .. 
83 ..   NEdit is a single stand-alone executable file which can be installed by simply
84 ..   copying the appropriate executable "nedit" for your system.  Both sources and
85 ..   executables are available from http://www.nedit.org.  The optional "nc" (NEdit
86 ..   Client) program is also available for users who want to run nedit in
87 ..   client/server mode.
88 .. 
89 .. Getting Started
90 .. ---------------
91 .. ~ NEDITDOC
93   Help sections of interest to new users are listed under the "Basic Operation"
94   heading in the top-level Help menu:
96       Selecting_Text_
97       Finding_and_Replacing_Text_
98       Cut_and_Paste_
99       Using_the_Mouse_
100       Keyboard_Shortcuts_
101       Shifting_and_Filling_
103   Programmers should also read the introductory section under the "Features for
104   Programming" section:
106       Programming_with_NEdit_
108   If you get into trouble, the Undo command in the Edit menu can reverse any
109   modifications that you make.  NEdit does not change the file you are editing
110   until you tell it to Save.
112 3>Editing an Existing File
114   To open an existing file, choose Open... from the file menu. Select the file
115   that you want to open in the pop-up dialog that appears and click on OK.  You
116   may open any number of files at the same time.  Depending on your settings
117   (cf. "Tabbed_Editing_") each file can appear in its own editor window, or it
118   can appear under a tab in the same editor window.  Using Open... rather than
119   re-typing the NEdit command and running additional copies of NEdit, will give
120   you quick access to all of the files you have open via the Windows menu, and
121   ensure that you don't accidentally open the same file twice.  NEdit has no
122   "main" window.  It remains running as long as at least one editor window is
123   open.
125 3>Creating a New File
127   If you already have an empty (Untitled) window displayed, just begin typing
128   in the window.  To create a new Untitled window, choose New Window or New Tab
129   from the File menu.   To give the file a name and save its contents to the
130   disk, choose Save or Save As... from the File menu.
132 3>Backup Files
134   NEdit maintains periodic backups of the file you are editing so that you can
135   recover the file in the event of a problem such as a system crash, network
136   failure, or X server crash.  These files are saved under the name `~filename`
137   (on Unix) or `_filename` (on VMS), where filename is the name of the file you
138   were editing.  If an NEdit process is killed, some of these backup files may
139   remain in your directory.  (To remove one of these files on Unix, you may
140   have to prefix the `~' (tilde) character with a (backslash) to prevent the
141   shell from interpreting it as a special character.)
143 3>Shortcuts
145   As you become more familiar with NEdit, substitute the control and function
146   keys shown on the right side of the menus for pulling down menus with the
147   mouse.
149   Dialogs are also streamlined so you can enter information quickly and without
150   using the mouse*.  To move the keyboard focus around a dialog, use the tab
151   and arrow keys.  One of the buttons in a dialog is usually drawn with a
152   thick, indented, outline.  This button can be activated by pressing Return or
153   Enter.  The Cancel or Dismiss button can be activated by pressing escape. 
154   For example, to replace the string "thing" with "things" type:
156       <ctrl-r>thing<tab>things<return>
158   To open a file named "whole_earth.c", type:
160       <ctrl-o>who<return>
162   (how much of the filename you need to type depends on the other files in the
163   directory).  See the section called "Keyboard_Shortcuts_" for more details.
165   * Users who have set their keyboard focus mode to "pointer" should set
166   "Popups Under Pointer" in the Default Settings menu to avoid the additional
167   step of moving the mouse into the dialog.
168    ----------------------------------------------------------------------
170 Basic Operation
171 ===============
173 Selecting Text
174 --------------
176   NEdit has two general types of selections, primary (highlighted text), and
177   secondary (underlined text). Selections can cover either a simple range of
178   text between two points in the file, or they can cover a rectangular area of
179   the file. Rectangular selections are only useful with non-proportional (fixed
180   spacing) fonts.
182   To select text for copying, deleting, or replacing, press the left mouse
183   button with the pointer at one end of the text you want to select, and drag
184   it to the other end. The text will become highlighted. To select a whole
185   word, double click (click twice quickly in succession). Double clicking and
186   then dragging the mouse will select a number of words. Similarly, you can
187   select a whole line or a number of lines by triple clicking or triple
188   clicking and dragging. Quadruple clicking selects the whole file. After
189   releasing the mouse button, you can still adjust a selection by holding down
190   the shift key and dragging on either end of the selection. To delete the
191   selected text, press delete or backspace. To replace it, begin typing.
193   To select a rectangle or column of text, hold the Ctrl key while dragging the
194   mouse. Rectangular selections can be used in any context that normal
195   selections can be used, including cutting and pasting, filling, shifting,
196   dragging, and searching. Operations on rectangular selections automatically
197   fill in tabs and spaces to maintain alignment of text within and to the right
198   of the selection. Note that the interpretation of rectangular selections by
199   Fill Paragraph is slightly different from that of other commands, the section
200   titled "Shifting_and_Filling_" has details.
202   The middle mouse button can be used to make an additional selection (called
203   the secondary selection). As soon as the button is released, the contents of
204   this selection will be copied to the insert position of the window where the
205   mouse was last clicked (the destination window). This position is marked by a
206   caret shaped cursor when the mouse is outside of the destination window.  If
207   there is a (primary) selection, adjacent to the cursor in the window, the new
208   text will replace the selected text. Holding the shift key while making the
209   secondary selection will move the text, deleting it at the site of the
210   secondary selection, rather than copying it.
212   Selected text can also be dragged to a new location in the file using the
213   middle mouse button. Holding the shift key while dragging the text will copy
214   the selected text, leaving the original text in place. Holding the control
215   key will drag the text in overlay mode.
217   Normally, dragging moves text by removing it from the selected position at
218   the start of the drag, and inserting it at a new position relative to to the
219   mouse. Dragging a block of text over existing characters, displaces the
220   characters to the end of the selection. In overlay mode, characters which are
221   occluded by blocks of text being dragged are simply removed. When dragging
222   non-rectangular selections, overlay mode also converts the selection to
223   rectangular form, allowing it to be dragged outside of the bounds of the
224   existing text.
226   The section "Using_the_Mouse_" summarizes the mouse commands for making primary
227   and secondary selections. Primary selections can also be made via keyboard
228   commands, see "Keyboard_Shortcuts_".
229    ----------------------------------------------------------------------
231 Finding and Replacing Text
232 --------------------------
234   The Search menu contains a number of commands for finding and replacing text.
236   The Find... and Replace... commands present dialogs for entering text for
237   searching and replacing.  These dialogs also allow you to choose whether you
238   want the search to be sensitive to upper and lower case, or whether to use
239   the standard Unix pattern matching characters (regular expressions). 
240   Searches begin at the current text insertion position.
242   Find Again and Replace Again repeat the last find or replace command without
243   prompting for search strings.  To selectively replace text, use the two
244   commands in combination: Find Again, then Replace Again if the highlighted
245   string should be replaced, or Find Again again to go to the next string.
247   Find Selection searches for the text contained in the current primary
248   selection (see Selecting_Text_).  The selected text does not have to be in the
249   current editor window, it may even be in another program.  For example, if
250   the word dog appears somewhere in a window on your screen, and you want to
251   find it in the file you are editing, select the word dog by dragging the
252   mouse across it, switch to your NEdit window and choose Find Selection from
253   the Search menu.
255   Find Incremental, which opens the interactive search bar, is yet another variation
256   on searching, where every character typed triggers a new search.  After you've
257   completed the search string, the next occurrence in the buffer is found by hitting
258   the Return key, or by clicking on the icon to the left (magnifying glass). Holding
259   a Shift key down finds the previous occurrences.  To the right there is a clear
260   button with an icon resembling "|<". Clicking on it empties the search text widget
261   without disturbing selections.  A middle click on the clear button copies the
262   content of any existing selection into the search text widget and triggers a new
263   search.
264   
266 3>Searching Backwards
268   Holding down the shift key while choosing any of the search or replace
269   commands from the menu (or using the keyboard shortcut), will search in the
270   reverse direction.  Users who have set the search direction using the buttons
271   in the search dialog, may find it a bit confusing that Find Again and Replace
272   Again don't continue in the same direction as the original search (for
273   experienced users, consistency of the direction implied by the shift key is
274   more important).
276 3>Selective Replacement
278   To replace only some occurrences of a string within a file, choose Replace...
279   from the Search menu, enter the string to search for and the string to
280   substitute, and finish by pressing the Find button.  When the first
281   occurrence is highlighted, use either Replace Again (^T) to replace it, or
282   Find Again (^G) to move to the next occurrence without replacing it, and
283   continue in such a manner through all occurrences of interest.
285   To replace all occurrences of a string within some range of text, select the
286   range (see Selecting_Text_), choose Replace... from the Search menu, type the
287   string to search for and the string to substitute, and press the "R. in
288   Selection" button in the dialog.  Note that selecting text in the Replace...
289   dialog will unselect the text in the window.
290    ----------------------------------------------------------------------
292 Cut and Paste
293 -------------
295   The easiest way to copy and move text around in your file or between windows,
296   is to use the clipboard, an imaginary area that temporarily stores text and
297   data.  The Cut command removes the selected text (see Selecting_Text_) from
298   your file and places it in the clipboard.  Once text is in the clipboard, the
299   Paste command will copy it to the insert position in the current window.  For
300   example, to move some text from one place to another, select it by dragging
301   the mouse over it, choose Cut to remove it, click the pointer to move the
302   insert point where you want the text inserted, then choose Paste to insert
303   it.  Copy copies text to the clipboard without deleting it from your file. 
304   You can also use the clipboard to transfer text to and from other Motif
305   programs and X programs which make proper use of the clipboard.
307   There are many other methods for copying and moving text within NEdit windows
308   and between NEdit and other programs.  The most common such method is
309   clicking the middle mouse button to copy the primary selection (to the
310   clicked position).  Copying the selection by clicking the middle mouse button
311   in many cases is the only way to transfer data to and from many X programs. 
312   Holding the Shift key while clicking the middle mouse button moves the text,
313   deleting it from its original position, rather than copying it.  Other
314   methods for transferring text include secondary selections, primary selection
315   dragging, keyboard-based selection copying, and drag and drop.  These are
316   described in detail in the sections: "Selecting_Text_", "Using_the_Mouse_", 
317   and "Keyboard_Shortcuts_".
318    ----------------------------------------------------------------------
320 Using the Mouse
321 ---------------
323   Mouse-based editing is what NEdit is all about, and learning to use the more
324   advanced features like secondary selections and primary selection dragging
325   will be well worth your while.
327   If you don't have time to learn everything, you can get by adequately with
328   just the left mouse button:  Clicking the left button moves the cursor. 
329   Dragging with the left button makes a selection.  Holding the shift key while
330   clicking extends the existing selection, or begins a selection between the
331   cursor and the mouse.  Double or triple clicking selects a whole word or a
332   whole line.
334   This section will make more sense if you also read the section called,
335   "Selecting_Text_", which explains the terminology of selections, that is,
336   what is meant by primary, secondary, rectangular, etc.
339 3>Button and Modifier Key Summary
341   General meaning of mouse buttons and modifier keys:
343 4>  Buttons
345       Button 1 (left)    Cursor position and primary selection
347       Button 2 (middle)  Secondary selections, and dragging and
348                          copying the primary selection
350       Button 3 (right)   Quick-access programmable menu and pan
351                          scrolling
353 4>  Modifier keys
355       Shift   On primary selections, (left mouse button):
356                  Extends selection to the mouse pointer
357               On secondary and copy operations, (middle):
358                  Toggles between move and copy
360       Ctrl    Makes selection rectangular or insertion
361               columnar
363       Alt*    (on release) Exchange primary and secondary
364               selections.
367 3>Left Mouse Button
369   The left mouse button is used to position the cursor and to make primary
370   selections.
372     Click         Moves the cursor
374     Double Click  Selects a whole word
376     Triple Click  Selects a whole line
378     Quad Click    Selects the whole file
380     Shift Click   Adjusts (extends or shrinks) the
381                   selection, or if there is no existing
382                   selection, begins a new selection
383                   between the cursor and the mouse.
385     Ctrl+Shift+   Adjusts (extends or shrinks) the
386     Click         selection rectangularly.
388     Drag          Selects text between where the mouse
389                   was pressed and where it was released.
391     Ctrl+Drag     Selects rectangle between where the
392                   mouse was pressed and where it was
393                   released.
396 3>Right Mouse Button
398   The right mouse button posts a programmable menu for frequently used commands.
400     Click/Drag    Pops up the background menu (programmed
401                   from Preferences -> Default Settings ->
402                   Customize Menus -> Window Background).
404     Ctrl+Drag     Pan scrolling.  Scrolls the window
405                   both vertically and horizontally, as if
406                   you had grabbed it with your mouse.
409 3>Middle Mouse Button
411   The middle mouse button is for making secondary selections, and copying and
412   dragging the primary selection.
414     Click         Copies the primary selection to the
415                   clicked position.
417     Shift+Click   Moves the primary selection to the
418                   clicked position, deleting it from its
419                   original position.
421     Drag          1) Outside of the primary selection:
422                       Begins a secondary selection.
423                   2) Inside of the primary selection:
424                       Moves the selection by dragging.
426     Ctrl+Drag     1) Outside of the primary selection:
427                       Begins a rectangular secondary
428                       selection.
429                   2) Inside of the primary selection:
430                       Drags the selection in overlay
431                       mode (see below).
433   When the mouse button is released after creating a secondary selection:
435     No Modifiers  If there is a primary selection,
436                   replaces it with the secondary
437                   selection.  Otherwise, inserts the
438                   secondary selection at the cursor
439                   position.
441     Shift         Move the secondary selection, deleting
442                   it from its original position.  If
443                   there is a primary selection, the move
444                   will replace the primary selection
445                   with the secondary selection.
446                   Otherwise, moves the secondary
447                   selection to to the cursor position.
449     Alt*          Exchange the primary and secondary
450                   selections.
453   While moving the primary selection by dragging with the middle mouse button:
455     Shift         Leaves a copy of the original
456                   selection in place rather than
457                   removing it or blanking the area.
459     Ctrl          Changes from insert mode to overlay
460                   mode (see below).
462     Escape        Cancels drag in progress.
464   Overlay Mode: Normally, dragging moves text by removing it from the selected
465   position at the start of the drag, and inserting it at a new position
466   relative to to the mouse. When you drag a block of text over existing
467   characters, the existing characters are displaced to the end of the
468   selection.  In overlay mode, characters which are occluded by blocks of text
469   being dragged are simply removed.  When dragging non-rectangular selections,
470   overlay mode also converts the selection to rectangular form, allowing it to
471   be dragged outside of the bounds of the existing text.
473   Mouse buttons 4 and 5 are usually represented by a mouse wheel nowadays. 
474   They are used to scroll up or down in the text window.
476   * The Alt key may be labeled Meta or Compose-Character on some keyboards. 
477   Some window managers, including default configurations of mwm, bind
478   combinations of the Alt key and mouse buttons to window manager operations. 
479   In NEdit, Alt is only used on button release, so regardless of the window
480   manager bindings for Alt-modified mouse buttons, you can still do the
481   corresponding NEdit operation by using the Alt key AFTER the initial mouse
482   press, so that Alt is held while you release the mouse button.  If you find
483   this difficult or annoying, you can re-configure most window managers to skip
484   this binding, or you can re-configure NEdit to use a different key
485   combination.
486    ----------------------------------------------------------------------
488 Keyboard Shortcuts
489 ------------------
491   Most of the keyboard shortcuts in NEdit are shown on the right hand sides of
492   the pull-down menus.  However, there are more which are not as obvious.  These
493   include; dialog button shortcuts; menu and dialog mnemonics; labeled keyboard
494   keys, such as the arrows, page-up, page-down, and home; and optional Shift
495   modifiers on accelerator keys, like [Shift]Ctrl+F.
498 3>Menu Accelerators
500   Pressing the key combinations shown on the right of the menu items is a
501   shortcut for selecting the menu item with the mouse.  Some items have the shift
502   key enclosed in brackets, such as [Shift]Ctrl+F.  This indicates that the shift
503   key is optional.  In search commands, including the shift key reverses the
504   direction of the search.  In Shift commands, it makes the command shift the
505   selected text by a whole tab stop rather than by single characters.
508 3>Menu Mnemonics
510   Pressing the Alt key in combination with one of the underlined characters in
511   the menu bar pulls down that menu.  Once the menu is pulled down, typing the
512   underlined characters in a menu item (without the Alt key) activates that
513   item.  With a menu pulled down, you can also use the arrow keys to select menu
514   items, and the Space or Enter keys to activate them.
517 3>Keyboard Shortcuts within Dialogs
519   One button in a dialog is usually marked with a thick indented outline. 
520   Pressing the Return or Enter key activates this button.
522   All dialogs have either a Cancel or Dismiss button.  This button can be
523   activated by pressing the Escape (or Esc) key.
525   Pressing the tab key moves the keyboard focus to the next item in a dialog. 
526   Within an associated group of buttons, the arrow keys move the focus among the
527   buttons.  Shift+Tab moves backward through the items.
529   Most items in dialogs have an underline under one character in their name. 
530   Pressing the Alt key along with this character, activates a button as if you
531   had pressed it with the mouse, or moves the keyboard focus to the associated
532   text field or list.
534   You can select items from a list by using the arrow keys to move the
535   selection and space to select.
537   In file selection dialogs, you can type the beginning characters of the file
538   name or directory in the list to select files
541 3>Labeled Function Keys
543   The labeled function keys on standard workstation and PC keyboards, like the
544   arrows, and page-up and page-down, are active in NEdit, though not shown in the
545   pull-down menus.
547   Holding down the control key while pressing a named key extends the scope of
548   the action that it performs.  For example, Home normally moves the insert
549   cursor the beginning of a line.  Ctrl+Home moves it to the beginning of the
550   file. Backspace deletes one character, Ctrl+Backspace deletes one word.
552   Holding down the shift key while pressing a named key begins or extends a
553   selection.  Combining the shift and control keys combines their actions.  For
554   example, to select a word without using the mouse, position the cursor at the
555   beginning of the word and press Ctrl+Shift+RightArrow.  The Alt key modifies
556   selection commands to make the selection rectangular.
558   Under X and Motif, there are several levels of translation between keyboard
559   keys and the actions they perform in a program.  The "Customizing_NEdit_", and
560   "X_Resources_" sections of the Help menu have more information on this subject. 
561   Because of all of this configurability, and since keyboards and standards for
562   the meaning of some keys vary from machine to machine, the mappings may be
563   changed from the defaults listed below.
565 3>Modifier Keys (in general)
567     Ctrl   Extends the scope of the action that the key
568            would otherwise perform.  For example, Home
569            normally moves the insert cursor to the beginning
570            of a line. Ctrl+Home moves it to the beginning of
571            the file.  Backspace deletes one character, Ctrl+
572            Backspace deletes one word.
574     Shift  Extends the selection to the cursor position. If
575            there's no selection, begins one between the old
576            and new cursor positions.
578     Alt    When modifying a selection, makes the selection
579            rectangular.
581   (For the effects of modifier keys on mouse button presses, see the section
582   titled "Using_the_Mouse_")
584 3>All Keyboards
586     Escape        Cancels operation in progress: menu
587                   selection, drag, selection, etc.  Also
588                   equivalent to cancel button in dialogs.
590     Backspace     Delete the character before the cursor
592     Ctrl+BS       Delete the word before the cursor
594     Arrows --
596       Left        Move the cursor to the left one character
598       Ctrl+Left   Move the cursor backward one word
599                   (Word delimiters are settable, see
600                   "Customizing_NEdit_", and "X_Resources_")
602       Right       Move the cursor to the right one character
604       Ctrl+Right  Move the cursor forward one word
606       Up          Move the cursor up one line
608       Ctrl+Up     Move the cursor up one paragraph.
609                   (Paragraphs are delimited by blank lines)
611       Down        Move the cursor down one line.
613       Ctrl+Down   Move the cursor down one paragraph.
615     Ctrl+Return   Return with automatic indent, regardless
616                   of the setting of Auto Indent.
618     Shift+Return  Return without automatic indent,
619                   regardless of the setting of Auto Indent.
621     Ctrl+Tab      Insert an ASCII tab character, without
622                   processing emulated tabs.
624     Alt+Ctrl+<c>  Insert the control-code equivalent of
625                   a key <c>
627     Ctrl+/        Select everything (same as Select
628                   All menu item or ^A)
630     Ctrl+\        Unselect
632     Ctrl+U        Delete to start of line
634 3>PC Standard Keyboard
636     Ctrl+Insert   Copy the primary selection to the
637                   clipboard (same as Copy menu item or ^C)
638                   for compatibility with Motif standard key
639                   binding
640     Shift+Ctrl+
641     Insert        Copy the primary selection to the cursor
642                   location.
644     Delete        Delete the character before the cursor.
645                   (Can be configured to delete the character
646                   after the cursor, see "Customizing_NEdit_",
647                   and "X_Resources_")
649     Ctrl+Delete   Delete to end of line.
651     Shift+Delete  Cut, remove the currently selected text
652                   and place it in the clipboard. (same as
653                   Cut menu item or ^X) for compatibility
654                   with Motif standard key binding
655     Shift+Ctrl+
656     Delete        Cut the primary selection to the cursor
657                   location.
659     Home          Move the cursor to the beginning of the
660                   line
662     Ctrl+Home     Move the cursor to the beginning of the
663                   file
665     End           Move the cursor to the end of the line
667     Ctrl+End      Move the cursor to the end of the file
669     PageUp        Scroll and move the cursor up by one page.
671     PageDown      Scroll and move the cursor down by one
672                   page.
674     F10           Make the menu bar active for keyboard
675                   input (Arrow Keys, Return, Escape,
676                   and the Space Bar)
678     Alt+Home      Switch to the previously active document.
680     Ctrl+PageUp   Switch to the previous document.
682     Ctrl+PageDown Switch to the next document.
685 3>Specialty Keyboards  
687   On machines with different styles of keyboards, generally, text editing
688   actions are properly matched to the labeled keys, such as Remove,
689   Next-screen, etc..  If you prefer different key bindings, see the section
690   titled "Key_Binding_" under the Customizing heading in the Help menu.
691    ----------------------------------------------------------------------
693 Shifting and Filling
694 --------------------
696 3>Shift Left, Shift Right
698   While shifting blocks of text is most important for programmers (See Features
699   for Programming), it is also useful for other tasks, such as creating
700   indented paragraphs.
702   To shift a block of text one tab stop to the right, select the text, then
703   choose Shift Right from the Edit menu.  Note that the accelerator keys for
704   these menu items are Ctrl+9 and Ctrl+0, which correspond to the right and
705   left parenthesis on most keyboards.  Remember them as adjusting the text in
706   the direction pointed to by the parenthesis character.  Holding the Shift key
707   while selecting either Shift Left or Shift Right will shift the text by one
708   character.
710   It is also possible to shift blocks of text by selecting the text
711   rectangularly, and dragging it left or right (and up or down as well).  Using
712   a rectangular selection also causes tabs within the selection to be
713   recalculated and substituted, such that the non-whitespace characters remain
714   stationary with respect to the selection.
717 3>Filling  
719   Text filling using the Fill Paragraph command in the Edit menu is one of the
720   most important concepts in NEdit.  And it will be well worth your while to
721   understand how to use it properly.
723   In plain text files, unlike word-processor files, there is no way to tell
724   which lines are continuations of other lines, and which lines are meant to be
725   separate, because there is no distinction in meaning between newline
726   characters which separate lines in a paragraph, and ones which separate
727   paragraphs from other text.  This makes it impossible for a text editor like
728   NEdit to tell parts of the text which belong together as a paragraph from
729   carefully arranged individual lines.
731   In continuous wrap mode (Preferences -> Wrap -> Continuous), lines
732   automatically wrap and unwrap themselves to line up properly at the right
733   margin.  In this mode, you simply omit the newlines within paragraphs and let
734   NEdit make the line breaks as needed.  Unfortunately, continuous wrap mode is
735   not appropriate in the majority of situations, because files with extremely
736   long lines are not common under Unix and may not be compatible with all
737   tools, and because you can't achieve effects like indented sections, columns,
738   or program comments, and still take advantage of the automatic wrapping.
740   Without continuous wrapping, paragraph filling is not entirely automatic. 
741   Auto-Newline wrapping keeps paragraphs lined up as you type, but once
742   entered, NEdit can no longer distinguish newlines which join wrapped text,
743   and newlines which must be preserved.  Therefore, editing in the middle of a
744   paragraph will often leave the right margin messy and uneven.
746   Since NEdit can't act automatically to keep your text lined up, you need to
747   tell it explicitly where to operate, and that is what Fill Paragraph is for. 
748   It arranges lines to fill the space between two margins, wrapping the lines
749   neatly at word boundaries.  Normally, the left margin for filling is inferred
750   from the text being filled.  The first line of each paragraph is considered
751   special, and its left indentation is maintained separately from the remaining
752   lines (for leading indents, bullet points, numbered paragraphs, etc.). 
753   Otherwise, the left margin is determined by the furthest left non-whitespace
754   character.  The right margin is either the Wrap Margin, set in the
755   preferences menu (by default, the right edge of the window), or can also be
756   chosen on the fly by using a rectangular selection (see below).
758   There are three ways to use Fill Paragraph.  The simplest is, while you are
759   typing text, and there is no selection, simply select Fill Paragraph (or type
760   Ctrl+J), and NEdit will arrange the text in the paragraph adjacent to the
761   cursor.  A paragraph, in this case, means an area of text delimited by blank
762   lines.
764   The second way to use Fill Paragraph is with a selection.  If you select a
765   range of text and then chose Fill Paragraph, all of the text in the selection
766   will be filled.  Again, continuous text between blank lines is interpreted as
767   paragraphs and filled individually, respecting leading indents and blank
768   lines.
770   The third, and most versatile, way to use Fill Paragraph is with a
771   rectangular selection.  Fill Paragraph treats rectangular selections
772   differently from other commands.  Instead of simply filling the text inside
773   the rectangular selection, NEdit interprets the right edge of the selection
774   as the requested wrap margin.  Text to the left of the selection is not
775   disturbed (the usual interpretation of a rectangular selection), but text to
776   the right of the selection is included in the operation and is pulled in to
777   the selected region.  This method enables you to fill text to an arbitrary
778   right margin, without going back and forth to the wrap-margin dialog, as well
779   as to exclude text to the left of the selection such as comment bars or other
780   text columns.
781    ----------------------------------------------------------------------
783 Tabbed Editing
784 ----------------
786   NEdit is able to display files in distinct editor windows, or to display files
787   under tabs in the same editor window.  The Options for controlling the tabbed
788   interface are found under Preferences -> Default Settings -> Tabbed Editing 
789   (cf. "Preferences_", also "NEdit_Command_Line_"). 
790   
791   Notice that you can re-group tabs at any time by detaching and attaching them,
792   or moving them, to other windows. This can be done using the Windows menu, or
793   using the context menu, which pops up when right clicking on a tab.
795   You can switch to a tab by simply clicking on it, or you can use the keyboard.
796   The default keybindings to switch tabs (which are Ctrl+PageUp/-Down and Alt+Home,
797   see "Keyboard_Shortcuts_") can be changed using the actions previous_document(),
798   next_document() and last_document().
799   
800    ----------------------------------------------------------------------
802 File Format
803 -----------
805   While plain-text is probably the simplest and most interchangeable file
806   format in the computer world, there is still variation in what plain-text
807   means from system to system.  Plain-text files can differ in character set,
808   line termination, and wrapping.
810   While character set differences are the most obvious and pose the most
811   challenge to portability, they affect NEdit only indirectly via the same font
812   and localization mechanisms common to all X applications.  If your system is
813   set up properly, you will probably never see character-set related problems
814   in NEdit.  NEdit can not display Unicode text files, or any multi-byte
815   character set.
817   The primary difference between an MS DOS format file and a Unix format file,
818   is how the lines are terminated.  Unix uses a single newline character.  MS
819   DOS uses a carriage-return and a newline.  NEdit can read and write both file
820   formats, but internally, it uses the single character Unix standard.  NEdit
821   auto-detects MS DOS format files based on the line termination at the start
822   of the file.  Files are judged to be DOS format if all of the first five line
823   terminators, within a maximum range, are DOS-style.  To change the format in
824   which NEdit writes a file from DOS to Unix or visa versa, use the Save As...
825   command and check or un-check the MS DOS Format button.
827   Wrapping within text files can vary among individual users, as well as from
828   system to system.  Both Windows and MacOS make frequent use of plain text
829   files with no implicit right margin.  In these files, wrapping is determined
830   by the tool which displays them.  Files of this style also exist on Unix
831   systems, despite the fact that they are not supported by all Unix utilities. 
832   To display this kind of file properly in NEdit, you have to select the wrap
833   style called Continuous.  Wrapping modes are discussed in the sections:
834   Customizing -> Preferences, and Basic Operation -> Shifting and Filling.
836   The last and most minute of format differences is the terminating newline. 
837   Some Unix compilers and utilities require a final terminating newline on all
838   files they read and fail in various ways on files which do not have it.  Vi
839   and approximately half of Unix editors enforce the terminating newline on all
840   files that they write; Emacs does not enforce this rule.  Users are divided
841   on which is best.  NEdit makes the final terminating newline optional
842   (Preferences -> Default Settings -> Terminate with Line Break on Save).
843    ----------------------------------------------------------------------
845 Features for Programming
846 ========================
848 Programming with NEdit
849 ----------------------
851   Though general in appearance, NEdit has many features intended specifically
852   for programmers.  Major programming-related topics are listed in separate
853   sections under the heading: "Features for Programming": Syntax_Highlighting_,
854   Tabs/Emulated_Tabs_, Finding_Declarations_(ctags)_, Calltips_, and 
855   Auto/Smart_Indent_.  Minor topics related to programming are discussed below:
857 3>Language Modes
859   When NEdit initially reads a file, it attempts to determine whether the file
860   is in one of the computer languages that it knows about.  Knowing what language
861   a file is written in allows NEdit to assign highlight patterns and smart indent
862   macros, and to set language specific preferences like word delimiters, tab
863   emulation, and auto-indent.  Language mode can be recognized from both the file
864   name and from the first 200 characters of content.  Language mode recognition
865   and language-specific preferences are configured in: Preferences -> Default
866   Settings -> Language Modes....
868   You can set the language mode manually for a window, by selecting it from the
869   menu: Preferences -> Language Modes.
871 3>Backlighting [EXPERIMENTAL]
873   NEdit can be made to set the background color of particular classes of
874   characters to allow easy identification of those characters. This is
875   particularly useful if you need to be able to distinguish between tabs
876   and spaces in a file where the difference is important. The colors used
877   for backlighting are specified by a resource, "nedit*backlightCharTypes". 
878   You can turn backlighting on and off through the
879   Preferences -> Apply Backlighting menu entry.
881   If you prefer to have backlighting turned on for all new windows, use
882   the Preferences -> Default Settings -> Apply Backlighting menu entry. 
883   This settings can be saved along with other preferences using 
884   Preferences -> Save Defaults.
885   
886   **Important:** In future versions of NEdit, the backlighting feature will be
887   extended and reworked such that it becomes easier to configure. The current
888   way of controlling it through a resource is generally considered to be below
889   NEdit's usability standards. These future changes are likely to be
890   incompatible with the current format of the "nedit*backlightCharTypes"
891   resource, though. Therefore, it is expected that there will be no automatic
892   migration path for users who customize the resource.
894 3>Line Numbers
896   To find a particular line in a source file by line number, choose Goto Line
897   #... from the Search menu.  You can also directly select the line number text
898   in the compiler message in the terminal emulator window (xterm, decterm,
899   winterm, etc.) where you ran the compiler, and choose Goto Selected from the
900   Search menu.
902   To find out the line number of a particular line in your file, turn on
903   Statistics Line in the Preferences menu and position the insertion point
904   anywhere on the line.  The statistics line continuously updates the line number
905   of the line containing the cursor.
906   
907   To go to a specific column on a given line, choose Goto Line #... from the
908   Search menu and enter a line number and a column number separated by a 
909   comma.  (e.g. Enter "100,12" for line 100 column 12.)  If you want to go to
910   a column on the current line just leave out the line number.  (e.g. Enter
911   ",45" to go the column 45 on the current line.)
913 3>Matching Parentheses
915   To help you inspect nested parentheses, brackets, braces, quotes, and other
916   characters, NEdit has both an automatic parenthesis matching mode, and a Goto
917   Matching command.  Automatic parenthesis matching is activated when you type,
918   or move the insertion cursor after a parenthesis, bracket, or brace.  It
919   momentarily highlights either the opposite character ('Delimiter') or the
920   entire expression ('Range') when the opposite character is visible in the
921   window. To find a matching character anywhere in the file, select it or
922   position the cursor after it, and choose Goto Matching from the Search menu. 
923   If the character matches itself, such as a quote or slash, select the first
924   character of the pair.  NEdit will match {, (, [, <, ", ', `, /, and \.
925   Holding the Shift key while typing the accelerator key (Shift+Ctrl+M, by
926   default), will select all of the text between the matching characters.
927   
928   When syntax highlighting is enabled, the matching routines can optionally
929   make use of the syntax information for improved accuracy. In that case,
930   a brace inside a highlighted string will not match a brace inside a comment,
931   for instance.
932   
933 3>Opening Included Files
935   The Open Selected command in the File menu understands the C preprocessor's
936   #include syntax, so selecting an #include line and invoking Open Selected will
937   generally find the file referred to, unless doing so depends on the settings of
938   compiler switches or other information not available to NEdit.
940 3>Interface to Programming Tools
942   Integrated software development environments such as SGI's CaseVision and
943   Centerline Software's Code Center, can be interfaced directly with NEdit via
944   the client server interface.  These tools allow you to click directly on
945   compiler and runtime error messages and request NEdit to open files, and select
946   lines of interest.  The easiest method is usually to use the tool's interface
947   for character-based editors like vi, to invoke nc, but programmatic interfaces
948   can also be derived using the source code for nc.
950   There are also some simple compile/review, grep, ctree, and ctags browsers
951   available in the NEdit contrib directory on ftp.nedit.org.
952    ----------------------------------------------------------------------
954 Tabs/Emulated Tabs
955 ------------------
957 3>Changing the Tab Distance
959   Tabs are important for programming in languages which use indentation to show
960   nesting, as short-hand for producing white-space for leading indents.  As a
961   programmer, you have to decide how to use indentation, and how or whether tab
962   characters map to your indentation scheme.
964   Ideally, tab characters map directly to the amount of indent that you use to
965   distinguish nesting levels in your code.  Unfortunately, the Unix standard
966   for interpretation of tab characters is eight characters (probably dating
967   back to mechanical capabilities of the original teletype), which is usually
968   too coarse for a single indent.
970   Most text editors, NEdit included, allow you to change the interpretation of
971   the tab character, and many programmers take advantage of this, and set their
972   tabs to 3 or 4 characters to match their programming style.  In NEdit you set
973   the hardware tab distance in Preferences -> Tabs... for the current window,
974   or Preferences -> Default Settings -> Tabs... (general), or Preferences ->
975   Default Settings -> Language Modes... (language-specific) to change the
976   defaults for future windows.
978   Changing the meaning of the tab character makes programming much easier while
979   you're in the editor, but can cause you headaches outside of the editor,
980   because there is no way to pass along the tab setting as part of a plain-text
981   file.  All of the other tools which display, print, and otherwise process
982   your source code have to be made aware of how the tabs are set, and must be
983   able to handle the change.  Non-standard tabs can also confuse other
984   programmers, or make editing your code difficult for them if their text
985   editors don't support changes in tab distance.
987 3>Emulated Tabs
989   An alternative to changing the interpretation of the tab character is tab
990   emulation.  In the Tabs... dialog(s), turning on Emulated Tabs causes the Tab
991   key to insert the correct number of spaces and/or tabs to bring the cursor
992   the next emulated tab stop, as if tabs were set at the emulated tab distance
993   rather than the hardware tab distance. Backspacing immediately after entering
994   an emulated tab will delete the fictitious tab as a unit, but as soon as you
995   move the cursor away from the spot, NEdit will forget that the collection of
996   spaces and tabs is a tab, and will treat it as separate characters.  To enter
997   a real tab character with "Emulate Tabs" turned on, use Ctrl+Tab.
999   It is also possible to tell NEdit not to insert ANY tab characters at all in
1000   the course of processing emulated tabs, and in shifting and rectangular
1001   insertion/deletion operations, for programmers who worry about the
1002   misinterpretation of tab characters on other systems.
1003    ----------------------------------------------------------------------
1005 ..                             ** NOTE **
1007 .. The following Tabs Dialog and Customize Window Title Dialog sections
1008 .. should only appear in the online documentation, and not in any of 
1009 .. the other possible forms. The rationale is that they are not directly
1010 .. obtained from the Help menu, but are buried in preference dialogs.
1012 .. ? help~
1013 .. Tabs Dialog
1014 .. -----------
1015 .. 
1016 ..   The Tabs dialog controls both the operation of the Tab key, and
1017 ..   the interpretation of tab characters within a file.
1018 ..   
1019 ..   The first field, Tab Spacing, controls how  NEdit responds to
1020 ..   tab characters in a file.  On most Unix and VMS systems the
1021 ..   conventional interpretation of a tab character is to advance the
1022 ..   text position to the nearest multiple of eight characters (a tab
1023 ..   spacing of 8).  However, many programmers of C and other
1024 ..   structured languages, when given the choice, prefer a tab
1025 ..   spacing of 3 or 4 characters.  Setting a three or four character
1026 ..   hardware tab spacing is useful and convenient as long as your
1027 ..   other software tools support it.  Unfortunately, on Unix and VMS
1028 ..   systems, system utilities, such as more, and printing software
1029 ..   can't always properly display files with other than eight
1030 ..   character tabs.
1031 ..   
1032 ..   Selecting "Emulate Tabs" will cause the Tab key to insert the
1033 ..   correct number of spaces or tabs to reach the next tab stop, as
1034 ..   if the tab spacing were set at the value in the "Emulated tab
1035 ..   spacing" field.  Backspacing immediately after entering an
1036 ..   emulated tab will delete it as a unit, but as soon as you move
1037 ..   the cursor away from the spot, NEdit will forget that the
1038 ..   collection of spaces and tabs is a tab, and will treat it as
1039 ..   separate characters.  To enter a real tab character with
1040 ..   "Emulate Tabs" turned on, use Ctrl+Tab.
1041 ..   
1042 ..   In generating emulated tabs, and in Shift Left, Paste Column,
1043 ..   and some rectangular selection operations, NEdit inserts blank
1044 ..   characters (spaces or tabs) to preserve the alignment of
1045 ..   non-blank characters. The bottom toggle button in the Tabs
1046 ..   dialog instructs NEdit whether to insert tab characters as
1047 ..   padding in such situations. Turning this off, will keep NEdit
1048 ..   from automatically inserting tabs. Some software developers
1049 ..   prefer to keep their source code free of tabs to avoid its
1050 ..   misinterpretation on systems with different tab character
1051 ..   conventions.
1052 ..    ----------------------------------------------------------------------
1054 .. Customize Window Title Dialog
1055 .. -----------------------------
1056 .. 
1057 ..   The Customize Window Title dialog allows you to customize 
1058 ..   and test the way information will be displayed in each window's 
1059 ..   title field.
1060 ..   
1061 ..   **Definition of the title**
1062 ..   
1063 ..   The upper half of the dialog can be used to select the various 
1064 ..   components that should be displayed in the title. The layout can be 
1065 ..   fine-tuned by editing the printf() like format string below the 
1066 ..   component buttons: additional characters can be entered, or the 
1067 ..   order can be changed.
1068 ..   
1069 ..   The following sequences are interpreted in the format string:
1070 ..   
1071 ..    %c    ClearCase view tag (only relevant when NEdit is 
1072 ..          used together with ClearCase)
1073 ..    %[n]d directory, with one optional numeric digit n 
1074 ..          specifying the maximum number of trailing directory 
1075 ..          components to display. Skipped components are 
1076 ..          replaced by an ellipsis (...).
1077 ..    %f    file name, without the path name
1078 ..    %h    host name
1079 ..    %s    NEdit server name (server mode only)
1080 ..    %[*]S file status, either verbose (%S) or brief (%*S).
1081 ..          In verbose mode the file status is spelled out: 
1082 ..          read-only, locked, and modified. In brief mode, 
1083 ..          abbreviations and an asterisk are used for the 
1084 ..          respective states: RO, LO, *.
1085 ..    %u    user name
1086 ..   
1087 ..   The format string and the component buttons are continously synchronized.
1088 ..   
1089 ..   The default format is:
1090 ..   
1091 ..     {%c} [%s] %f (%S) - %d
1092 ..   
1093 ..   The resulting title will only contain elements with 
1094 ..   a value. Hence, the title is compressed as follows:
1095 ..   
1096 ..    * Elements with no value are removed.             
1097 ..                                                      
1098 ..    * Empty parenthesis pairs i.e. (), [] or {}, or parenthesis
1099 ..      pairs containing only space(s), are removed.
1100 ..                                                      
1101 ..    * Sequences of spaces are replaced with one space.
1102 ..                                                      
1103 ..    * Leading spaces and dashes are removed.          
1104 ..                                                      
1105 ..    * Trailing spaces and dashes are removed.         
1106 ..   
1107 ..   If the server name and the ClearCase view tag are identical, only 
1108 ..   the first one specified in the format string will be displayed.
1109 ..   
1110 ..   **Previewing the settings**
1111 ..   
1112 ..   The lower part of the dialog can be used to test the selected title
1113 ..   under various conditions. For some of the components that are selected 
1114 ..   for display, various states can be enforced on the preview. 
1115 ..   
1116 ..   For instance, components that are not always active (such the 
1117 ..   NEdit server name) can be turned on or off in the preview.
1118 ..   
1119 .. ~ help
1121 Auto/Smart Indent
1122 -----------------
1124   Programmers who use structured languages usually require some form of
1125   automatic indent, so that they don't have to continually re-type the
1126   sequences of tabs and/or spaces needed to maintain lengthy running indents. 
1127   NEdit therefore offers "smart" indent, in addition to the traditional
1128   automatic indent which simply lines up the cursor position with the previous
1129   line.
1131 3>Smart Indent
1133   Smart indent macros are only available by default for C and C++, and while
1134   these can easily be configured for different default indentation distances,
1135   they may not conform to everyone's exact C programming style.  Smart indent
1136   is programmed in terms of macros in the NEdit macro language which can be
1137   entered in: Preferences -> Default Settings -> Indent -> Program Smart
1138   Indent.  Hooks are provided for intervening at the point that a newline is
1139   entered, either via the user pressing the Enter key, or through
1140   auto-wrapping; and for arbitrary type-in to act on specific characters typed.
1142   To type a newline character without invoking smart-indent when operating in
1143   smart-indent mode, hold the Shift key while pressing the Return or Enter key.
1145 3>Auto-Indent
1147   With Indent set to Auto (the default), NEdit keeps a running indent.  When
1148   you press the Return or Enter key, spaces and tabs are inserted to line up
1149   the insert point under the start of the previous line.
1151   Regardless of indent-mode, Ctrl+Return always does the automatic indent;
1152   Shift+Return always does a return without indent.
1154 3>Block Indentation Adjustment
1156   The Shift Left and Shift Right commands as well as rectangular dragging can
1157   be used to adjust the indentation for several lines at once.  To shift a
1158   block of text one character to the right, select the text, then choose Shift
1159   Right from the Edit menu.  Note that the accelerator keys for these menu
1160   items are Ctrl+9 and Ctrl+0, which correspond to  the right and left
1161   parenthesis on most keyboards.  Remember them as adjusting the text in the
1162   direction pointed to by the parenthesis character.  Holding the Shift key
1163   while selecting either Shift Left or Shift Right will shift the text by one
1164   tab stop (or by one emulated tab stop if tab emulation is turned on).  The
1165   help section "Shifting and Filling" under "Basic Operation" has details.
1166    ----------------------------------------------------------------------
1168 Syntax Highlighting
1169 -------------------
1171   Syntax Highlighting means using colors and fonts to help distinguish language
1172   elements in programming languages and other types of structured files. 
1173   Programmers use syntax highlighting to understand code faster and better, and
1174   to spot many kinds of syntax errors more quickly.
1176   To use syntax highlighting in NEdit, select Highlight Syntax in the
1177   Preferences menu.  If NEdit recognizes the computer language that you are
1178   using, and highlighting rules (patterns) are available for that language, it
1179   will highlight your text, and maintain the highlighting, automatically, as
1180   you type.
1182   If NEdit doesn't correctly recognize the type of the file you are editing,
1183   you can manually select a language mode from Language Modes in the
1184   Preferences menu.  You can also program the method that NEdit uses to
1185   recognize language modes in Preferences -> Default Settings -> Language
1186   Modes....
1188   If no highlighting patterns are available for the language that you want to
1189   use, you can create new patterns relatively quickly.  The Help section
1190   "Highlighting_Patterns_" under "Customizing", has details.
1192   If you are satisfied with what NEdit is highlighting, but would like it to
1193   use different colors or fonts, you can change these by selecting Preferences
1194   -> Default Settings -> Syntax Highlighting -> Text Drawing Styles. 
1195   Highlighting patterns are connected with font and color information through a
1196   common set of styles so that colorings defined for one language will be
1197   similar across others, and patterns within the same language which are meant
1198   to appear identical can be changed in the same place.  To understand which
1199   styles are used to highlight the language you are interested in, you may need
1200   to look at "Highlighting_Patterns_" section, as well.
1202   Syntax highlighting is CPU intensive, and under some circumstances can affect
1203   NEdit's responsiveness.  If you have a particularly slow system, or work with
1204   very large files, you may not want to use it all of the time.  Syntax
1205   highlighting introduces two kinds of delays.  The first is an initial parsing
1206   delay, proportional to the size of the file.  This delay is also incurred
1207   when pasting large sections of text, filtering text through shell commands,
1208   and other circumstances involving changes to large amounts of text.  The
1209   second kind of delay happens when text which has not previously been visible
1210   is scrolled in to view.  Depending on your system, and the highlight patterns
1211   you are using, this may or may not be noticeable.  A typing delay is also
1212   possible, but unlikely if you are only using the built-in patterns.
1213    ----------------------------------------------------------------------
1215 Finding Declarations (ctags)
1216 ----------------------------
1218   NEdit can process tags files generated using the Unix _ctags command or the
1219   Exuberant Ctags program.  Ctags creates index files correlating names of
1220   functions and declarations with their locations in C, Fortran, or Pascal source
1221   code files. (See the ctags manual page for more information).  Ctags produces a
1222   file called "tags" which can be loaded by NEdit.  NEdit can manage any number
1223   of tags files simultaneously.  Tag collisions are handled with a popup menu to
1224   let the user decide which tag to use.  In 'Smart' mode NEdit will automatically
1225   choose the desired tag based on the scope of the file or module. Once loaded,
1226   the information in the tags file enables NEdit to go directly to the
1227   declaration of a highlighted function or data structure name with a single
1228   command.  To load a tags file, select "Load Tags File" from the File menu and
1229   choose a tags file to load, or specify the name of the tags file on the NEdit
1230   command line:
1232       nedit -tags tags
1234   NEdit can also be set to load a tags file automatically when it starts up. 
1235   Setting the X resource nedit.tagFile to the name of a tag file tells NEdit to
1236   look for that file at startup time (see "Customizing_NEdit_").  The file name
1237   can be either a complete path name, in which case NEdit will always load the
1238   same tags file, or a file name without a path or with a relative path, in
1239   which case NEdit will load it starting from the current directory.  The
1240   second option allows you to have different tags files for different projects,
1241   each automatically loaded depending on the directory you're in when you start
1242   NEdit.  Setting the name to "tags" is an obvious choice since this is the
1243   name that ctags uses. NEdit normally evaluates relative path tag file
1244   specifications every time a file is opened. All accessible tag files are
1245   loaded at this time. To disable the automatic loading of tag files specified
1246   as relative paths, set the X resource nedit.alwaysCheckRelativeTagsSpecs to
1247   False.
1249   To unload a tags file, select "Un-load Tags File" from the File menu and
1250   choose from the list of tags files.  NEdit will keep track of tags file updates
1251   by checking the timestamp on the files, and automatically update the tags
1252   cache. 
1254   To find the definition of a function or data structure once a tags file is
1255   loaded, select the name anywhere it appears in your program (see 
1256   "Selecting_Text_") and choose "Find Definition" from the Search menu.
1257    ----------------------------------------------------------------------
1259 Calltips
1260 --------
1261   
1262   Calltips are little yellow boxes that pop up to remind you what the arguments
1263   and return type of a function are.  More generally, they're a UI mechanism to
1264   present a small amount of crucial information in a prominent location.  To 
1265   display a calltip, select some text and choose "Show Calltip" from the Search
1266   menu.  To kill a displayed calltip, hit Esc.
1267   
1268   Calltips get their information from one of two places -- either a tags file (see
1269   "Finding_Declarations_(ctags)_") or a calltips file.  First, any loaded calltips 
1270   files are searched for a definition, and if nothing is found then the tags 
1271   database is searched.  If a tag is found that matches the highlighted text then
1272   a calltip is displayed with the first few lines of the definition -- usually 
1273   enough to show you what the arguments of a function are.
1274   
1275   You can load a calltips file by using choosing "Load Calltips File" from the
1276   File menu.  You can unload a calltips file by selecting it from the 
1277   "Unload Calltips File" submenu of the File menu.  You can also choose one or
1278   more default calltips files to be loaded for each language mode using the 
1279   "Default calltips file(s)" field of the Language Modes dialog.
1280   
1281   The calltips file format is very simple.  calltips files are organized in blocks
1282   separated by blank lines.  The first line of the block is the key, which is the
1283   word that is matched when a calltip is requested.  The rest of the block is
1284   displayed as the calltip.  
1285   
1286   Almost any text at all can appear in a calltip key or a calltip.  There are no
1287   special characters that need to be escaped.  The only issues to note are that
1288   trailing whitespace is ignored, and you cannot have a blank line inside a
1289   calltip.  (Use a single period instead --  it'll be nearly invisible.)  You should
1290   also avoid calltip keys that begin and end with '@*' characters, since those are
1291   used to mark special blocks.
1293   There are five special block types--comment, include, language, alias, and 
1294   version--which are distinguished by their first lines, "@* comment @*", 
1295   "@* include @*", "@* language @*", "@* alias @*", and "@* version @*" respectively 
1296   (without quotes).
1298   Comment blocks are ignored when reading calltips files.
1300   Include blocks specify additional calltips files to load, one per line.  The ~
1301   character can be used for your $HOME directory, but other shell shortcuts like
1302   @* and ? can't be used. Include blocks allow you to make a calltips file for your
1303   project that includes, say, the calltips files for C, Motif, and Xt.
1305   Language blocks specify which language mode the calltips should be used with. 
1306   When a calltip is requested it won't match tips from languages other than the
1307   current language mode.  Language blocks only affect the tips listed after the
1308   block.
1310   Alias blocks allow a calltip to have multiple keys.  The first line of the block
1311   is the key for the calltip to be displayed, and the rest of the lines are
1312   additional keys, one per line, that should also show the calltip.
1314   Version blocks are ignored for the time being.
1316   You can use calltips in your own macros using the calltip() and kill_calltip()
1317   macro subroutines and the $calltip_ID macro variable.  See the 
1318   Macro_Subroutines_ section for details.
1319    ----------------------------------------------------------------------
1320   
1321 Regular Expressions
1322 ===================
1324 Basic Regular Expression Syntax
1325 -------------------------------
1327   Regular expressions (regex's) are useful as a way to match inexact sequences
1328   of characters.  They can be used in the `Find...' and `Replace...' search
1329   dialogs and are at the core of Color Syntax Highlighting patterns.  To specify
1330   a regular expression in a search dialog, simply click on the `Regular
1331   Expression' radio button in the dialog.
1333   A regex is a specification of a pattern to be matched in the searched text. 
1334   This pattern consists of a sequence of tokens, each being able to match a
1335   single character or a sequence of characters in the text, or assert that a
1336   specific position within the text has been reached (the latter is called an
1337   anchor.)  Tokens (also called atoms) can be modified by adding one of a number
1338   of special quantifier tokens immediately after the token.  A quantifier token
1339   specifies how many times the previous token must be matched (see below.)
1341   Tokens can be grouped together using one of a number of grouping constructs,
1342   the most common being plain parentheses.  Tokens that are grouped in this way
1343   are also collectively considered to be a regex atom, since this new larger
1344   atom may also be modified by a quantifier.
1346   A regex can also be organized into a list of alternatives by separating each
1347   alternative with pipe characters, `|'.  This is called alternation.  A match
1348   will be attempted for each alternative listed, in the order specified, until a
1349   match results or the list of alternatives is exhausted (see Alternation_
1350   section below.)
1352 3>The 'Any' Character
1354   If a dot (`.') appears in a regex, it means to match any character exactly
1355   once.  By default, dot will not match a newline character, but this behavior
1356   can be changed (see help topic Parenthetical_Constructs_, under the
1357   heading, Matching Newlines).
1359 3>Character Classes
1361   A character class, or range, matches exactly one character of text, but the
1362   candidates for matching are limited to those specified by the class.  Classes
1363   come in two flavors as described below:
1365      [...]   Regular class, match only characters listed.
1366      [^...]  Negated class, match only characters NOT listed.
1368   As with the dot token, by default negated character classes do not match
1369   newline, but can be made to do so.
1371   The characters that are considered special within a class specification are
1372   different than the rest of regex syntax as follows. If the first character in
1373   a class is the `]' character (second character if the first character is `^')
1374   it is a literal character and part of the class character set.  This also
1375   applies if the first or last character is `-'.  Outside of these rules, two
1376   characters separated by `-' form a character range which includes all the
1377   characters between the two characters as well.  For example, `[^f-j]' is the
1378   same as `[^fghij]' and means to match any character that is not `f', `g',
1379   `h', `i', or `j'.
1381 3>Anchors
1383   Anchors are assertions that you are at a very specific position within the
1384   search text.  NEdit regular expressions support the following anchor tokens:
1386      ^    Beginning of line
1387      $    End of line
1388      <    Left word boundary
1389      >    Right word boundary
1390      \B   Not a word boundary
1392   Note that the \B token ensures that neither the left nor the right 
1393   character are delimiters, or that both left and right characters are 
1394   delimiters.  The left word anchor checks whether the previous character 
1395   is a delimiter and the next character is not.  The right word anchor
1396   works in a similar way.
1398 3>Quantifiers
1400   Quantifiers specify how many times the previous regular expression atom may
1401   be matched in the search text.  Some quantifiers can produce a large
1402   performance penalty, and can in some instances completely lock up NEdit.  To
1403   prevent this, avoid nested quantifiers, especially those of the maximal
1404   matching type (see below.)
1406   The following quantifiers are maximal matching, or "greedy", in that they
1407   match as much text as possible.
1409      *   Match zero or more
1410      +   Match one  or more
1411      ?   Match zero or one
1413   The following quantifiers are minimal matching, or "lazy", in that they match
1414   as little text as possible.
1416      *?   Match zero or more
1417      +?   Match one  or more
1418      ??   Match zero or one
1420   One final quantifier is the counting quantifier, or brace quantifier. It
1421   takes the following basic form:
1423      {min,max}  Match from `min' to `max' times the
1424                 previous regular expression atom.
1426   If `min' is omitted, it is assumed to be zero.  If `max' is omitted, it is
1427   assumed to be infinity.  Whether specified or assumed, `min' must be less
1428   than or equal to `max'.  Note that both `min' and `max' are limited to
1429   65535.  If both are omitted, then the construct is the same as `*'.   Note
1430   that `{,}' and `{}' are both valid brace constructs.  A single number
1431   appearing without a comma, e.g. `{3}' is short for the `{min,min}' construct,
1432   or to match exactly `min' number of times.
1434   The quantifiers `{1}' and `{1,1}' are accepted by the syntax, but are
1435   optimized away since they mean to match exactly once, which is redundant
1436   information.  Also, for efficiency, certain combinations of `min' and `max'
1437   are converted to either `*', `+', or `?' as follows:
1439      {} {,} {0,}    *
1440      {1,}           +
1441      {,1} {0,1}     ?
1443   Note that {0} and {0,0} are meaningless and will generate an error message at
1444   regular expression compile time.
1446   Brace quantifiers can also be "lazy".  For example {2,5}? would try to match
1447   2 times if possible, and will only match 3, 4, or 5 times if that is what is
1448   necessary to achieve an overall match.
1450 3>Alternation
1452   A series of alternative patterns to match can be specified by separating them
1453   with vertical pipes, `|'.  An example of _alternation would be `a|be|sea'. 
1454   This will match `a', or `be', or `sea'. Each alternative can be an
1455   arbitrarily complex regular expression. The alternatives are attempted in
1456   the order specified.  An empty alternative can be specified if desired, e.g.
1457   `a|b|'.  Since an empty alternative can match nothingness (the empty string),
1458   this guarantees that the expression will match.
1460 3>Comments
1462   Comments are of the form `(?#<comment text>)' and can be inserted anywhere
1463   and have no effect on the execution of the regular expression.  They can be
1464   handy for documenting very complex regular expressions.  Note that a comment
1465   begins with `(?#' and ends at the first occurrence of an ending parenthesis,
1466   or the end of the regular expression... period.  Comments do not recognize
1467   any escape sequences.
1468    ----------------------------------------------------------------------
1470 Metacharacters
1471 --------------
1473 3>Escaping Metacharacters
1475   In a regular expression (regex), most ordinary characters match themselves.  
1476   For example, `ab%' would match anywhere `a' followed by `b' followed by `%'
1477   appeared in the text.  Other characters don't match themselves, but are
1478   metacharacters. For example, backslash is a special metacharacter which
1479   'escapes' or changes the meaning of the character following it. Thus, to
1480   match a literal backslash would require a regular expression to have two
1481   backslashes in sequence. NEdit provides the following escape sequences so
1482   that metacharacters that are used by the regex syntax can be specified as
1483   ordinary characters.
1485      \(  \)  \-  \[  \]  \<  \>  \{  \}
1486      \.  \|  \^  \$  \*  \+  \?  \&  \\
1488 3>Special Control Characters
1490   There are some special characters that are  difficult or impossible to type. 
1491   Many of these characters can be constructed as a sort of metacharacter or
1492   sequence by preceding a literal character with a backslash. NEdit recognizes
1493   the following special character sequences:
1495      \a  alert (bell)
1496      \b  backspace
1497      \e  ASCII escape character (***)
1498      \f  form feed (new page)
1499      \n  newline
1500      \r  carriage return
1501      \t  horizontal tab
1502      \v  vertical tab
1504      *** For environments that use the EBCDIC character set,
1505          when compiling NEdit set the EBCDIC_CHARSET compiler
1506          symbol to get the EBCDIC equivalent escape
1507          character.)
1509 3>Octal and Hex Escape Sequences
1511   Any ASCII (or EBCDIC) character, except null, can be specified by using
1512   either an octal escape or a hexadecimal escape, each beginning with \0 or \x
1513   (or \X), respectively.  For example, \052 and \X2A both specify the `*'
1514   character.  Escapes for null (\00 or \x0) are not valid and will generate an
1515   error message.  Also, any escape that exceeds \0377 or \xFF will either cause
1516   an error or have any additional character(s) interpreted literally. For
1517   example, \0777 will be interpreted as \077 (a `?' character) followed by `7'
1518   since \0777 is greater than \0377.
1520   An invalid digit will also end an octal or hexadecimal escape.  For example,
1521   \091 will cause an error since `9' is not within an octal escape's range of
1522   allowable digits (0-7) and truncation before the `9' yields \0 which is
1523   invalid.
1525 3>Shortcut Escape Sequences
1527   NEdit defines some escape sequences that are handy shortcuts for commonly
1528   used character classes.
1530    \d  digits            0-9
1531    \l  letters           a-z, A-Z, and locale dependent letters
1532    \s  whitespace        \t, \r, \v, \f, and space
1533    \w  word characters   letters, digits, and underscore, `_'
1535   \D, \L, \S, and \W are the same as the lowercase versions except that the
1536   resulting character class is negated.  For example, \d is equivalent to
1537   `[0-9]', while \D is equivalent to `[^0-9]'.
1539   These escape sequences can also be used within a character class.  For
1540   example, `[\l_]' is the same as `[a-zA-Z@_]', extended with possible locale 
1541   dependent letters. The escape sequences for special characters, and octal
1542   and hexadecimal escapes are also valid within a class.
1544 3>Word Delimiter Tokens
1546   Although not strictly a character class, the following escape sequences
1547   behave similarly to character classes:
1549      \y   Word delimiter character
1550      \Y   Not a word delimiter character
1552   The `\y' token matches any single character that is one of the characters
1553   that NEdit recognizes as a word delimiter character, while the `\Y' token
1554   matches any character that is NOT a word delimiter character.  Word delimiter
1555   characters are dynamic in nature, meaning that the user can change them through
1556   preference settings.  For this reason, they must be handled differently by the
1557   regular expression engine.  As a consequence of this, `\y' and `\Y' can not be
1558   used within a character class specification.
1559    ----------------------------------------------------------------------
1561 Parenthetical Constructs
1562 ------------------------
1564 3>Capturing Parentheses
1566   Capturing Parentheses are of the form `(<regex>)' and can be used to group
1567   arbitrarily complex regular expressions.  Parentheses can be nested, but the
1568   total number of parentheses, nested or otherwise, is limited to 50 pairs. 
1569   The text that is matched by the regular expression between a matched set of
1570   parentheses is captured and available for text substitutions and
1571   backreferences (see below.)  Capturing parentheses carry a fairly high
1572   overhead both in terms of memory used and execution speed, especially if
1573   quantified by `*' or `+'.
1575 3>Non-Capturing Parentheses
1577   Non-Capturing Parentheses are of the form `(?:<regex>)' and facilitate
1578   grouping only and do not incur the overhead of normal capturing parentheses. 
1579   They should not be counted when determining numbers for capturing parentheses
1580   which are used with backreferences and substitutions.  Because of the limit
1581   on the number of capturing parentheses allowed in a regex, it is advisable to
1582   use non-capturing parentheses when possible.
1584 3>Positive Look-Ahead
1586   Positive look-ahead constructs are of the form `(?=<regex>)' and implement a
1587   zero width assertion of the enclosed regular expression.  In other words, a
1588   match of the regular expression contained in the positive look-ahead
1589   construct is attempted.  If it succeeds, control is passed to the next
1590   regular expression atom, but the text that was consumed by the positive
1591   look-ahead is first unmatched (backtracked) to the place in the text where
1592   the positive look-ahead was first encountered.
1594   One application of positive look-ahead is the manual implementation of a
1595   first character discrimination optimization.  You can include a positive
1596   look-ahead that contains a character class which lists every character that
1597   the following (potentially complex) regular expression could possibly start
1598   with.  This will quickly filter out match attempts that can not possibly
1599   succeed.
1601 3>Negative Look-Ahead
1603   Negative look-ahead takes the form `(?!<regex>)' and is exactly the same as
1604   positive look-ahead except that the enclosed regular expression must NOT
1605   match.  This can be particularly useful when you have an expression that is
1606   general, and you want to exclude some special cases.  Simply precede the
1607   general expression with a negative look-ahead that covers the special cases
1608   that need to be filtered out.
1609   
1610 3>Positive Look-Behind
1612   Positive look-behind constructs are of the form `(?<=<regex>)' and implement
1613   a zero width assertion of the enclosed regular expression in front of the
1614   current matching position.  It is similar to a positive look-ahead assertion,
1615   except for the fact the the match is attempted on the text preceding the
1616   current position, possibly even in front of the start of the matching range
1617   of the entire regular expression.
1618   
1619   A restriction on look-behind expressions is the fact that the expression
1620   must match a string of a bounded size.  In other words, `*', `+', and `{n,}'
1621   quantifiers are not allowed inside the look-behind expression. Moreover,
1622   matching performance is sensitive to the difference between the upper and
1623   lower bound on the matching size.  The smaller the difference, the better the
1624   performance.  This is especially important for regular expressions used in
1625   highlight patterns.
1626   
1627   Positive look-behind has similar applications as positive look-ahead.
1628   
1629 3>Negative Look-Behind
1631   Negative look-behind takes the form `(?<!<regex>)' and is exactly the same as
1632   positive look-behind except that the enclosed regular expression must
1633   NOT match. The same restrictions apply.
1634   
1635   Note however, that performance is even more sensitive to the distance 
1636   between the size boundaries: a negative look-behind must not match for 
1637   **any** possible size, so the matching engine must check **every** size.
1639 3>Case Sensitivity
1641   There are two parenthetical constructs that control case sensitivity:
1643      (?i<regex>)   Case insensitive; `AbcD' and `aBCd' are
1644                    equivalent.
1646      (?I<regex>)   Case sensitive;   `AbcD' and `aBCd' are
1647                    different.
1649   Regular expressions are case sensitive by default, that is, `(?I<regex>)' is
1650   assumed.  All regular expression token types respond appropriately to case
1651   insensitivity including character classes and backreferences.  There is some
1652   extra overhead involved when case insensitivity is in effect, but only to the
1653   extent of converting each character compared to lower case.
1655 3>Matching Newlines
1657   NEdit regular expressions by default handle the matching of newlines in a way
1658   that should seem natural for most editing tasks.  There are situations,
1659   however, that require finer control over how newlines are matched by some
1660   regular expression tokens.
1662   By default, NEdit regular expressions will NOT match a newline character for
1663   the following regex tokens: dot (`.'); a negated character class (`[^...]');
1664   and the following shortcuts for character classes:
1666      `\d', `\D', `\l', `\L', `\s', `\S', `\w', `\W', `\Y'
1668   The matching of newlines can be controlled for the `.' token, negated
1669   character classes, and the `\s' and `\S' shortcuts by using one of the
1670   following parenthetical constructs:
1672      (?n<regex>)  `.', `[^...]', `\s', `\S' match newlines
1674      (?N<regex>)  `.', `[^...]', `\s', `\S' don't match
1675                                             newlines
1677   `(?N<regex>)' is the default behavior.
1679 3>Notes on New Parenthetical Constructs
1681   Except for plain parentheses, none of the parenthetical constructs capture
1682   text.  If that is desired, the construct must be wrapped with capturing
1683   parentheses, e.g. `((?i<regex))'.
1685   All parenthetical constructs can be nested as deeply as desired, except for
1686   capturing parentheses which have a limit of 50 sets of parentheses,
1687   regardless of nesting level.
1689 3>Back References
1691   Backreferences allow you to match text captured by a set of capturing
1692   parenthesis at some later position in your regular expression.  A
1693   backreference is specified using a single backslash followed by a single
1694   digit from 1 to 9 (example: \3).  Backreferences have similar syntax to
1695   substitutions (see below), but are different from substitutions in that they
1696   appear within the regular expression, not the substitution string. The number
1697   specified with a backreference identifies which set of text capturing
1698   parentheses the backreference is associated with. The text that was most
1699   recently captured by these parentheses is used by the backreference to
1700   attempt a match.  As with substitutions, open parentheses are counted from
1701   left to right beginning with 1.  So the backreference `\3' will try to match
1702   another occurrence of the text most recently matched by the third set of
1703   capturing parentheses.  As an example, the regular expression `(\d)\1' could
1704   match `22', `33', or `00', but wouldn't match `19' or `01'.
1706   A backreference must be associated with a parenthetical expression that is
1707   complete.  The expression `(\w(\1))' contains an invalid backreference since
1708   the first set of parentheses are not complete at the point where the
1709   backreference appears.
1711 3>Substitution
1713   Substitution strings are used to replace text matched by a set of capturing
1714   parentheses.  The substitution string is mostly interpreted as ordinary text
1715   except as follows.
1717   The escape sequences described above for special characters, and octal and
1718   hexadecimal escapes are treated the same way by a substitution string. When
1719   the substitution string contains the `&' character, NEdit will substitute the
1720   entire string that was matched by the `Find...' operation. Any of the first
1721   nine sub-expressions of the match string can also be inserted into the
1722   replacement string.  This is done by inserting a `\' followed by a digit from
1723   1 to 9 that represents the string matched by a parenthesized expression
1724   within the regular expression.  These expressions are numbered left-to-right
1725   in order of their opening parentheses.
1727   The capitalization of text inserted by `&' or `\1', `\2', ... `\9' can be
1728   altered by preceding them with `\U', `\u', `\L', or `\l'.  `\u' and `\l'
1729   change only the first character of the inserted entity, while `\U' and `\L'
1730   change the entire entity to upper or lower case, respectively.
1731    ----------------------------------------------------------------------
1733 Advanced Topics
1734 ---------------
1736 3>Substitutions
1738   Regular expression substitution can be used to program automatic editing
1739   operations.  For example, the following are search and replace strings to find
1740   occurrences of the `C' language subroutine `get_x', reverse the first and
1741   second parameters, add a third parameter of NULL, and change the name to
1742   `new_get_x':
1744      Search string:   `get_x *\( *([^ ,]*), *([^\)]*)\)'
1745      Replace string:  `new_get_x(\2, \1, NULL)'
1747 3>Ambiguity
1749   If a regular expression could match two different parts of the text, it will
1750   match the one which begins earliest.  If both begin in the same place but
1751   match different lengths, or match the same length in different ways, life
1752   gets messier, as follows.
1754   In general, the possibilities in a list of alternatives are considered in
1755   left-to-right order.  The possibilities for `*', `+', and `?' are considered
1756   longest-first, nested constructs are considered from the outermost in, and
1757   concatenated constructs are considered leftmost-first. The match that will be
1758   chosen is the one that uses the earliest possibility in the first choice that
1759   has to be made.  If there is more than one choice, the next will be made in
1760   the same manner (earliest possibility) subject to the decision on the first
1761   choice.  And so forth.
1763   For example, `(ab|a)b*c' could match `abc' in one of two ways.  The first
1764   choice is between `ab' and `a'; since `ab' is earlier, and does lead to a
1765   successful overall match, it is chosen.  Since the `b' is already spoken for,
1766   the `b*' must match its last possibility, the empty string, since it must
1767   respect the earlier choice.
1769   In the particular case where no `|'s are present and there is only one `*',
1770   `+', or `?', the net effect is that the longest possible match will be
1771   chosen.  So `ab*', presented with `xabbbby', will match `abbbb'.  Note that
1772   if `ab*' is tried against `xabyabbbz', it will match `ab' just after `x', due
1773   to the begins-earliest rule.  (In effect, the decision on where to start the
1774   match is the first choice to be made, hence subsequent choices must respect
1775   it even if this leads them to less-preferred alternatives.)
1777 3>References
1779   An excellent book on the care and feeding of regular expressions is
1781           Mastering Regular Expressions, 2nd Edition
1782           Jeffrey E. F. Friedl
1783           2002, O'Reilly & Associates
1784           ISBN 0-596-00289-0
1785    ----------------------------------------------------------------------
1787 Example Regular Expressions
1788 ---------------------------
1790   The following are regular expression examples which will match:
1792 * An entire line.
1793 !       ^.*$
1795 * Blank lines.
1796 !       ^$
1798 * Whitespace on a line.
1799 !       \s+
1801 * Whitespace across lines.
1802 !       (?n\s+)
1804 * Whitespace that spans at least two lines. Note minimal matching `*?' quantifier.
1805 !       (?n\s*?\n\s*)
1807 * IP address (not robust).
1808 !       (?:\d{1,3}(?:\.\d{1,3}){3})
1810 * Two character US Postal state abbreviations (includes territories).
1811 !       [ACDF-IK-PR-W][A-Z]
1813 * Web addresses.
1814 !       (?:http://)?www\.\S+
1816 * Case insensitive double words across line breaks.
1817 !       (?i(?n<(\S+)\s+\1>))
1819 * Upper case words with possible punctuation.
1820 !       <[A-Z][^a-z\s]*>
1822    ----------------------------------------------------------------------
1824 Macro/Shell Extensions
1825 ======================
1827 Shell Commands and Filters
1828 --------------------------
1830   The Shell menu (Unix versions only) allows you to execute Unix shell commands
1831   from within NEdit.  You can add items to the menu to extend NEdit's command
1832   set or to incorporate custom automatic editing features using shell commands
1833   or editing languages like awk and sed.  To add items to the menu, select
1834   Preferences -> Default Settings Customize Menus -> Shell Menu.  NEdit comes
1835   pre-configured with a few useful Unix commands like spell and sort, but we
1836   encourage you to add your own custom extensions.
1838   Filter Selection... prompts you for a Unix command to use to process the
1839   currently selected text.  The output from this command replaces the contents
1840   of the selection.
1842   Execute Command... prompts you for a Unix command and replaces the current
1843   selection with the output of the command.  If there is no  selection, it
1844   deposits the output at the current insertion point. In the Shell Command
1845   field, the % character expands to the name (including directory path), and
1846   the # character expands to the current line number of the file in the window.
1847   To include a % or # character in the command, use %% or ##, respectively.  
1849   Execute Command Line uses the position of the cursor in the window to
1850   indicate a line to execute as a shell command line.  The cursor may be
1851   positioned anywhere on the line.  This command allows you to use an NEdit
1852   window as an editable command window for saving output and saving commands
1853   for re-execution. Note that the same character expansions described above
1854   in Execute Command also occur with this command.
1856   The X resource called nedit.shell (See "Customizing_NEdit_") determines which
1857   Unix shell is used to execute commands.  The default value for this resource
1858   is /bin/csh.
1859    ----------------------------------------------------------------------
1861 Learn/Replay
1862 ------------
1864   Selecting Learn Keystrokes from the Macro menu puts NEdit in learn mode.  In
1865   learn mode, keystrokes and menu commands are recorded, to be played back
1866   later, using the Replay Keystrokes command, or pasted into a macro in the
1867   Macro Commands dialog of the Default Settings menu in Preferences.
1869   Note that only keyboard and menu commands are recorded, not mouse clicks or
1870   mouse movements since these have no absolute point of reference, such as
1871   cursor or selection position.  When you do a mouse-based operation in learn
1872   mode, NEdit will beep (repeatedly) to remind you that the operation was not
1873   recorded.
1875   Learn mode is also the quickest and easiest method for writing macros.  The
1876   dialog for creating macro commands contains a button labeled "Paste Learn /
1877   Replay Macro", which will deposit the last sequence learned into the body of
1878   the macro.
1880 3>Repeating Actions and Learn/Replay Sequences
1882   You can repeat the last (keyboard-based) command, or learn/replay sequence
1883   with the Repeat... command in the Macro menu.  To repeat an action, first do
1884   the action (that is, insert a character, do a search, move the cursor), then
1885   select Repeat..., decide how or how many times you want it repeated, and
1886   click OK.  For example, to move down 30 lines through a file, you could type:
1887   <Down Arrow> Ctrl+, 29 <Return>.  To repeat a learn/replay sequence, first
1888   learn it, then select Repeat..., click on Learn/Replay and how you want it
1889   repeated, then click OK.
1891   If the commands you are repeating advance the cursor through the file, you
1892   can also repeat them within a range of characters, or from the current cursor
1893   position to the end of the file.  To iterate over a range of characters, use
1894   the primary selection (drag the left mouse button over the text) to mark the
1895   range you want to operate on, and select "In Selection" in the Repeat dialog.
1897   When using In "Selection" or "To End" with a learned sequence, try to do
1898   cursor movement as the last step in the sequence, since testing of the cursor
1899   position is only done at the end of the sequence execution.  If you do cursor
1900   movement first, for example searching for a particular word then doing a
1901   modification, the position of the cursor won't be checked until the sequence
1902   has potentially gone far beyond the end of your desired range.
1904   It's easy for a repeated command to get out of hand, and you can easily
1905   generate an infinite loop by using range iteration on a command which doesn't
1906   progress.  To cancel a repeating command in progress, type Ctrl+. (period),
1907   or select Cancel Macro from the Macro menu.
1908    ----------------------------------------------------------------------
1910 Macro Language
1911 --------------
1913   Macros can be called from Macro menu commands, window background menu
1914   commands, within the smart-indent framework, from the autoload macro file and
1915   from the command line.
1916   Macro menu and window background menu commands are defined under Preferences
1917   -> Default Settings -> Customize Menus.  Help on creating items in these
1918   menus can be found in the section, Help -> Customizing -> Preferences.
1920   The autoload macro file is a file of macro commands and definitions which
1921   NEdit will automatically execute when it is first started.  Its location is
1922   dependent on your environment:
1923   
1924 * The default place for the file is '$HOME/.nedit/autoload.nm',
1925 * if the variable $NEDIT_HOME is set in your environment it is located at '$NEDIT_HOME/autoload.nm',
1926 * if you are using old-style run control files (i.e. $HOME/.nedit is a regular file) it is located in '$HOME/.neditmacro'.
1928   (For VMS, the file is in '$NEDIT_HOME/autoload.nm' if $NEDIT_HOME is set, in
1929   'SYS$LOGIN:.neditmacro' otherwise.)
1931   NEdit's macro language is a simple interpreter with integer arithmetic,
1932   dynamic strings, and C-style looping constructs (very similar to the
1933   procedural portion of the Unix awk program).  From the macro language, you
1934   can call the same action routines which are bound to keyboard keys and menu
1935   items, as well additional subroutines for accessing and manipulating editor
1936   data, which are specific to the macro language (these are listed in the
1937   sections titled "Macro_Subroutines_", and "Action_Routines_").
1940 3>Syntax
1942   An NEdit macro language program consists of a list of statements, each
1943   terminated by a newline.  Groups of statements which are executed together
1944   conditionally, such as the body of a loop, are surrounded by curly braces
1945   "{}".
1947   Blank lines and comments are also allowed.  Comments begin with a "#" and end
1948   with a newline, and can appear either on a line by themselves, or at the end
1949   of a statement.
1951   Statements which are too long to fit on a single line may be split across
1952   several lines, by placing a backslash "\" character at the end of each line
1953   to be continued.
1956 3>Data Types
1958   The NEdit macro language recognizes only three data types, dynamic character
1959   strings, integer values and associative arrays. In general strings and
1960   integers can be used interchangeably. If a string represents an integer
1961   value, it can be used as an integer. Integers can be compared and
1962   concatenated with strings. Arrays may contain integers, strings, or arrays.
1963   Arrays are stored key/value pairs. Keys are always stored as strings.
1965 4>Integer Constants
1967   Integers are non-fractional numbers in the range of -2147483647 to
1968   2147483647.  Integer constants must be in decimal.  For example:
1970     a = -1
1971     b = 1000
1973 4>Character String Constants
1975   Character string constants are enclosed in double quotes.  For example:
1977      a = "a string"
1978      dialog("Hi there!", "OK")
1980   Strings may also include C-language style escape sequences:
1982      \\ Backslash     \t Tab              \f Form feed
1983      \" Double quote  \b Backspace        \a Alert
1984      \n Newline       \r Carriage return  \v Vertical tab
1986   For example, to send output to the terminal from which NEdit was started, a
1987   newline character is necessary because, like printf, t_print requires
1988   explicit newlines, and also buffers its output on a per-line basis:
1990      t_print("a = " a "\n")
1993 3>Variables
1995   Variable names must begin either with a letter (local variables), or a $
1996   (global variables).  Beyond the first character, variables may also contain
1997   numbers and underscores `_'.  Variables are called in to existence just by
1998   setting them (no explicit declarations are necessary).
2000   Local variables are limited in scope to the subroutine (or menu item
2001   definition) in which they appear.  Global variables are accessible from all
2002   routines, and their values persist beyond the call which created them, until
2003   reset.
2005 4>Built-in Variables
2007   NEdit has a number of permanently defined variables, which are used to access
2008   global editor information and information about the the window in which the
2009   macro is executing.  These are listed along with the built in functions in
2010   the section titled "Macro_Subroutines_".
2013 3>Functions and Subroutines
2015   The syntax of a function or subroutine call is:
2017      function_name(arg1, arg2, ...)
2019   where arg1, arg2, etc. represent the argument values which are passed to
2020   the routine being called.  A function or subroutine call can be on a line by
2021   itself, as above, or if it returns a value, can be invoked within a character
2022   or numeric expression:
2024      a = fn1(b, c) + fn2(d)
2025      dialog("fn3 says: " fn3())
2027   Arguments are passed by value.  This means that you can not return values via
2028   the argument list, only through the function value or indirectly through
2029   agreed-upon global variables.
2031 4>Built-in Functions
2033   NEdit has a wide range of built in functions which can be called from the
2034   macro language.  These routines are divided into two classes, macro-language
2035   functions, and editor action routines.  Editor action routines are more
2036   flexible, in that they may be called either from the macro language, or bound
2037   directly to keys via translation tables.  They are also limited, however, in
2038   that they can not return values.  Macro language routines can return values,
2039   but can not be bound to keys in translation tables.
2041   Nearly all of the built-in subroutines operate on an implied window, which is
2042   initially the window from which the macro was started.  To manipulate the
2043   contents of other windows, use the focus_window subroutine to change the
2044   focus to the ones you wish to modify.  focus_window can also be used to
2045   iterate over all of the currently open windows, using the special keyword
2046   names, "last" and "next".
2048   For backwards compatibility, hyphenated action routine names are allowed, and
2049   most of the existing action routines names which contain underscores have an
2050   equivalent version containing hyphens ('-') instead of underscores.  Use of
2051   these names is discouraged.  The macro parser resolves the ambiguity between
2052   '-' as the subtraction/negation operator, and - as part of an action routine
2053   name by assuming subtraction unless the symbol specifically matches an action
2054   routine name.
2056 4>User Defined Functions
2058   Users can define their own macro subroutines, using the define keyword:
2060      define subroutine_name {
2061         < body of subroutine >
2062      }
2064   Macro definitions can not appear within other definitions, or within macro
2065   menu item definitions (usually they are found in the autoload macro file).
2067   The arguments with which a user-defined subroutine or function was invoked,
2068   are presented as $1, $2, ... , $9 or $args[expr], where expr can be evaluated
2069   to an integer from 1 to the number of arguments.  The number of arguments can
2070   be read from $n_args or $args[]. The array $args[expr] is the only way to
2071   access arguments beyond the first 9.
2073   To return a value from a subroutine, and/or to exit from the subroutine
2074   before the end of the subroutine body, use the return statement:
2076      return <value to return>
2079 3>Operators and Expressions
2081   Operators have the same meaning and precedence that they do in C, except for
2082   ^, which raises a number to a power (y^x means y to the x power), rather than
2083   bitwise exclusive OR.  The table below lists operators in decreasing order of
2084   precedence.
2086      Operators                Associativity
2087      ()
2088      ^                        right to left
2089      - ! ++ --                (unary)
2090      * / %                    left to right
2091      + -                      left to right
2092      > >= < <= == !=          left to right
2093      &                        left to right
2094      |                        left to right
2095      &&                       left to right
2096      ||                       left to right
2097      (concatenation)          left to right
2098      = += -= *= /= %=, &= |=  right to left
2100   The order in which operands are evaluated in an expression is undefined,
2101   except for && and ||, which like C, evaluate operands left to right, but stop
2102   when further evaluation would no longer change the result.
2104 4>Numerical Operators
2106   The numeric operators supported by the NEdit macro language are listed below:
2108      + addition
2109      - subtraction or negation
2110      * multiplication
2111      / division
2112      % modulo
2113      ^ power
2114      & bitwise and
2115      | bitwise or
2117   Increment (++) and decrement (--) operators can also be appended or prepended
2118   to variables within an expression.  Prepended increment/decrement operators
2119   act before the variable is evaluated.  Appended increment/decrement operators
2120   act after the variable is evaluated.
2122 4>Logical and Comparison Operators
2124   Logical operations produce a result of 0 (for false) or 1 (for true).  In a
2125   logical operation, any non-zero value is recognized to mean true.  The
2126   logical and comparison operators allowed in the NEdit macro language are
2127   listed below:
2129      && logical and
2130      || logical or
2131      !  not
2132      >  greater
2133      <  less
2134      >= greater or equal
2135      <= less or equal
2136      == equal (integers and/or strings)
2137      != not equal (integers and/or strings)
2139 4>Character String Operators
2141   The "operator" for concatenating two strings is the absence of an operator. 
2142   Adjoining character strings with no operator in between means concatenation:
2144      d = a b "string" c
2145      t_print("the value of a is: " a)
2147   Comparison between character strings is done with the == and != operators,
2148   (as with integers).  There are a number of useful built-in routines for
2149   working with character strings, which are listed in the section called 
2150   "Macro_Subroutines_".
2152 4>Arrays and Array Operators
2154   Arrays may contain either strings, integers, or other arrays. Arrays are 
2155   associative, which means that they relate two pieces of information, the key
2156   and  the value. The key is always a string; if you use an integer it is
2157   converted to a string.
2159   To determine if a given key is in an array, use the 'in' keyword.
2161       if ("6" in x)
2162           <body>
2164   If the left side of the in keyword is an array, the result is true if every
2165   key in the left array is in the right array. Array values are not compared.
2167   To iterate through all the keys of an array use the 'for' looping construct.
2168   Keys are not guaranteed in any particular order:
2170       for (aKey in x)
2171           <body>
2173   Elements can be removed from an array using the delete command:
2175       delete x[3] # deletes element with key 3
2176       delete x[]  # deletes all elements
2178   The number of elements in an array can be determined by referencing the
2179   array with no indices:
2181       dialog("array x has " x[] " elements", "OK")
2183   Arrays can be combined with some operators. All the following operators only 
2184   compare the keys of the arrays.
2186       result = x + y   (Merge arrays)
2187       
2188   The 'result' is a new array containing keys from both x and y. If
2189   duplicates are present values from y are used.
2190           
2191       result = x - y   (Remove keys)
2193   The 'result' is a new array containing all keys from x that are not in y.
2194           
2195       result = x & y   (Common keys)
2196           
2197   The 'result' is a new array containing all keys which are in both x and y.
2198   The values from y are used.
2199           
2200       result = x | y   (Unique keys)
2201       
2202   The 'result' is a new array containing keys which exist in either x or y, 
2203   but not both.
2205   When duplicate keys are encountered using the + and & operators, the values 
2206   from the array on the right side of the operators are used for the result.
2207   All  of the above operators are array only, meaning both the left and right
2208   sides of the operator must be arrays. The results are also arrays.
2210   Array keys can also contain multiple dimensions:
2211   
2212       x[1, 1, 1] = "string"
2214   These are used in the expected way, e.g.:
2215   
2216       for (i = 1; i < 3; i++)
2217       {
2218           for (j = 1; j < 3; j++)
2219           {
2220               x[i, j] = k++
2221           }
2222       }
2223       
2224   gives the following array:
2225   
2226       x[1, 1] = 0
2227       x[1, 2] = 1
2228       x[2, 1] = 2
2229       x[2, 2] = 3
2231   Internally all indices are part of one string, separated by the string 
2232   $sub_sep (ASCII 0x1c, 'FS'). The first key in the above example is in
2233   fact:
2234   
2235       ["1" $sub_sep "1"]
2237   If you need to extract one of the keys, you can use split(), using 
2238   $sub_sep as the separator.
2240   You can also check for the existence of multi-dimensional array by 
2241   looking for $sub_sep in the key.
2243   Last, you need $sub_sep if you want to use the 'in' keyword.
2244   
2245       if ((1,2) in myArray)
2246       {..}
2247       
2248   doesn't work, but
2249   
2250       if (("1" $sub_sep "2") in myArray)
2251       {..}
2252       
2253   does work.
2255 3>Looping and Conditionals
2257   NEdit supports looping constructs: for and while, and conditional statements:
2258   if and else, with essentially the same syntax as C:
2260      for (<init>, ...; <condition>; <increment>, ...) <body>
2262      while (<condition>) <body>
2264      if (<condition>) <body>
2266      if (<condition>) <body> else <body>
2268   <body>, as in C, can be a single statement, or a list of statements enclosed
2269   in curly braces ({}).  <condition> is an expression which must evaluate to
2270   true for the statements in <body> to be executed.  for loops may also contain
2271   initialization statements, <init>, executed once at the beginning of the
2272   loop, and increment/decrement statements (or any arbitrary statement), which
2273   are executed at the end of the loop, before the condition is evaluated again.
2275   Examples:
2277     for (i=0; i<100; i++)
2278        j = i * 2
2280     for (i=0, j=20; i<20; i++, j--) {
2281        k = i * j
2282        t_print(i, j, k)
2283     }
2285     while (k > 0)
2286     {
2287        k = k - 1
2288        t_print(k)
2289     }
2291     for (;;) {
2292        if (i-- < 1)
2293            break
2294     }
2296   Loops may contain break and continue statements.  A break statement causes an
2297   exit from the innermost loop, a continue statement transfers control to the
2298   end of the loop.
2299    ----------------------------------------------------------------------
2301 Macro Subroutines
2302 -----------------
2304 3>Built in Variables
2306   These variables are read-only and can not be changed.
2308 **$1**, **$2**, **$3**, **$4**, **$5**, **$6**, **$7**, **$8**, **$9**
2309 **$args**[~expr~]
2310 **$n_args**
2311   Argument information. The first 9 arguments (if there are that many) can
2312   be referenced as read-only values using the shorthand form. All arguments
2313   can be accessed as values in the **$args** array, using a numeric index
2314   starting at 1. The total number of arguments received by a function is
2315   given by **$n_args** or **$args[]**.
2317 **$active_pane**
2318   Index of the current pane.
2320 **$auto_indent**
2321   Contains the current preference for auto indent. 
2322   Can be  "off", "on" or "auto".
2324 **$calltip_ID**
2325   Equals the ID of the currently displayed calltip, or 0 if no calltip is
2326   being displayed.
2328 **$cursor**
2329   Position of the cursor in the current window.
2331 **$column**
2332   Column number of the cursor position in the current window.
2334 **$display_width**
2335   Width of the current pane in pixels.
2337 **$em_tab_dist**
2338   If tab emulation is turned on in the Tabs...
2339   dialog of the Preferences menu, value is the
2340   distance between emulated tab stops. If tab
2341   emulation is turned off, value is -1.
2343 **$empty_array**
2344   An array with no elements. This can be used to initialize 
2345   an array to an empty state.
2347 **$file_format**
2348   Current newline format that the file will be saved with. Can 
2349   be "unix", "dos" or "macintosh".
2351 **$file_name**
2352   Name of the file being edited in the current
2353   window, stripped of directory component.
2355 **$file_path**
2356   Directory component of file being edited in the current window.
2358 **$font_name**
2359   Contains the current plain text font name.
2361 **$font_name_bold**
2362   Contains the current bold text font name.
2364 **$font_name_bold_italic**
2365   Contains the current bold-italic text font name.
2367 **$font_name_italic**
2368   Contains the current italic text font name.
2370 **$highlight_syntax**
2371   Whether syntax highlighting is turned on.
2373 **$incremental_backup**
2374   Contains 1 if incremental auto saving is on, otherwise 0.
2376 **$incremental_search_line**
2377   Has a value of 1 if the preference is 
2378   selected to always show the incremental search line, otherwise 0.
2380 **$language_mode**
2381   Name of language mode set in the current window.
2383 **$line**
2384   Line number of the cursor position in the current window.
2386 **$locked**
2387   True if the file has been locked by the user.
2389 **$make_backup_copy**
2390   Has a value of 1 if original file is kept in a 
2391   backup file on save, otherwise 0.
2393 **$max_font_width**
2394   The maximum font width of all the active styles. 
2395   Syntax highlighting styles are only considered if syntax highlighting 
2396   is turned on.
2398 **$min_font_width**
2399   The minimum font width of all the active styles. 
2400   Syntax highlighting styles are only considered if syntax highlighting 
2401   is turned on.
2403 **$modified**
2404   True if the file in the current window has
2405   been modified and the modifications have not
2406   yet been saved.
2408 **$n_display_lines**
2409   The number of lines visible in the currently active pane.
2411 **$n_panes**
2412   The number of panes in the current window.
2414 **$overtype_mode**
2415   True if in Overtype mode.
2417 **$read_only**
2418   True if the file is read only.
2420 **$selection_start, $selection_end**   
2421   Beginning and ending positions of the
2422   primary selection in the current window, or
2423   -1 if there is no text selected in the current window.
2425 **$selection_left, $selection_right**  
2426   Left and right character offsets of the rectangular (primary) selection in
2427   the current window, or -1 if there is no selection or it is not rectangular.
2429 **$server_name**
2430   Name of the current NEdit server.
2432 **$show_line_numbers**
2433   Whether line numbers are shown next to the text.
2435 **$show_matching**
2436   Contains the current preference for showing matching pairs, 
2437   such as "[]" and "{}" pairs. Can be "off", "delimiter", or "range".
2439 **$match_syntax_based**
2440   Whether pair matching should use syntax information, if available.
2442 **$statistics_line**
2443   Has a value of 1 if the statistics line is shown, otherwise 0.
2445 **$sub_sep**
2446   Contains the value of the array sub-script separation string.
2448 **$tab_dist**
2449   The distance between tab stops for a
2450   hardware tab character, as set in the
2451   Tabs... dialog of the Preferences menu.
2453 **$text_length**
2454   The length of the text in the current window.
2456 **$top_line**
2457   The line number of the top line of the currently active pane.
2459 **$use_tabs**
2460   Whether the user is allowing the NEdit to insert tab characters to maintain
2461   spacing in tab emulation and rectangular dragging operations. (The setting of
2462   the "Use tab characters in padding and emulated tabs" button in the Tabs...
2463   dialog of the Preferences menu.)
2465 **$wrap_margin**
2466   The right margin in the current window for text wrapping and filling.
2468 **$wrap_text**
2469   The current wrap text mode. Values are "none", "auto" or "continuous".
2471 ..Disabled for 5.4 release.
2472 ..**$backlight_string**
2473 ..  The current value of the window's backlighting specification. This is empty
2474 ..  if backlighting is turned off. It can be changed through calls to the
2475 ..  built-in macro function set_backlight_string().
2478 3>Built-in Subroutines
2480 **append_file( string, filename )**
2481   Appends a string to a named file. Returns 1 on successful write, or 0 if
2482   unsuccessful.
2484 **beep()**
2485   Ring the bell.
2487 **calltip( "text_or_key" [, pos [, mode or position_modifier, ...]] )**
2488   Pops up a calltip. <pos> is an optional position in the buffer where the tip
2489   will be displayed.  Passing -1 for <pos> is equivalent to not specifying a 
2490   position, and it guarantees that the tip will appear on-screen somewhere even
2491   if the cursor is not.  The upper-left corner of the calltip will appear below
2492   where the cursor would appear if it were at this position.  <mode> is one of
2493   "tipText" (default), "tipKey", or "tagKey". "tipText" displays the text as-is,
2494   "tagKey" uses it as the key to look up a tag, then converts the tag to a
2495   calltip, and "tipKey" uses it as the key to look up a calltip, then falls back
2496   to "tagKey" behavior if that fails.  You'll usually use "tipKey" or "tipText".
2497   Finally, you can modify the placement of the calltip relative to the cursor
2498   position (or <pos>) with one or more of these optional position modifiers:
2499   "center" aligns the center of the calltip with the position.  "right" aligns
2500   the right edge of the calltip with the position.  ("center" and "right" may 
2501   not both be used.)  "above" places the calltip above the position.  "strict"
2502   does not allow the calltip to move from its position in order to avoid going 
2503   off-screen or obscuring the cursor.  Returns the ID of the calltip if it was 
2504   found and/or displayed correctly, 0 otherwise.
2506 **clipboard_to_string()**  
2507   Returns the contents of the clipboard as a macro string. Returns empty
2508   string on error.
2510 **dialog( message, btn_1_label, btn_2_label, ... )**  
2511   Pop up a dialog for querying and presenting information to the user. First
2512   argument is a string to show in the message area of the dialog. Up to eight
2513   additional optional arguments represent labels for buttons to appear along
2514   the bottom of the dialog. Returns the number of the button pressed (the
2515   first button is number 1), or 0 if the user closed the dialog via the window
2516   close box.
2518 **focus_window( window_name )**  
2519   Sets the window on which subsequent macro commands operate. window_name can
2520   be either a fully qualified file name, or a relative filename (which will
2521   be completed from NEdit's working directory) or one of "last" for the last
2522   window created, or "next" for the next window in the chain from the currently
2523   focused window (the first window being the one returned from calling
2524   focus_window("last"). Returns the name of the newly-focused window, or an
2525   empty string if the requested window was not found.
2527 **get_character( position )**  
2528   Returns the single character at the position
2529   indicated by the first argument to the routine from the current window.
2531 **get_range( start, end )**  
2532   Returns the text between a starting and ending position from the current
2533   window.
2535 **get_selection()**  
2536   Returns a string containing the text currently selected by the primary
2537   selection either from the current window (no keyword), or from anywhere on
2538   the screen (keyword "any").
2540 **getenv( name )**
2541   Gets the value of an environment variable.
2543 **kill_calltip( [calltip_ID] )**
2544   Kills any calltip that is being displayed in the window in which the macro is
2545   running.  If there is no displayed calltip this does nothing.  If a calltip
2546   ID is supplied then the calltip is killed only if its ID is calltip_ID.
2548 **length( string )**
2549   Returns the length of a string
2551 **list_dialog( message, text, btn_1_label, btn_2_label, ... )**  
2552   Pop up a dialog for prompting the user to choose a line from the given text
2553   string. The first argument is a message string to be used as a title for the
2554   fixed text describing the list. The second string provides the list data:
2555   this is a text string in which list entries are separated by newline
2556   characters. Up to seven additional optional arguments represent labels for
2557   buttons to appear along the bottom of the dialog. Returns the line of text
2558   selected by the user as the function value (without any newline separator) or
2559   the empty string if none was selected, and number of the button pressed (the
2560   first button is number 1), in $list_dialog_button. If the user closes the
2561   dialog via the window close box, the function returns the empty string, and
2562   $list_dialog_button returns 0.
2564 **max( n1, n2, ... )**
2565   Returns the maximum value of all of its arguments
2567 **min( n1, n2, ... )**
2568   Returns the minimum value of all of its arguments
2570 **read_file( filename )**  
2571   Reads the contents of a text file into a string. On success, returns 1 in
2572   $read_status, and the contents of the file as a string in the subroutine
2573   return value. On failure, returns the empty string "" and an 0 $read_status.
2575 **replace_in_string( string, search_for, replace_with [, type, "copy"] )**  
2576   Replaces all occurrences of a search string in a string with a replacement
2577   string. Arguments are 1: string to search in, 2: string to search for, 3:
2578   replacement string.  There are two optional arguments.  One is a search type, 
2579   either "literal", "case", "word", "caseWord", "regex", or "regexNoCase".  
2580   The default search type is "literal".  If the optional "copy" argument is
2581   specified, a copy of the input string is returned when no replacements were
2582   performed.  By default an empty string ("") will be returned in this case.
2583   Returns a new string with all of the replacements done.
2585 **replace_range( start, end, string )**  
2586   Replaces all of the text in the current window between two positions.
2588 **replace_selection( string )**  
2589   Replaces the primary-selection selected text in the current window.
2591 **replace_substring( string, start, end, replace_with )**  
2592   Replacing a substring between two positions in a string within another string.
2594 **search( search_for, start [, search_type, wrap, direction] )**  
2595   Searches silently in a window without dialogs, beeps, or changes to the
2596   selection. Arguments are: 1: string to search for, 2: starting position.
2597   Optional arguments may include the strings: "wrap" to make the search wrap
2598   around the beginning or end of the string, "backward" or "forward" to change
2599   the search direction ("forward" is the default), "literal", "case", "word",
2600   "caseWord", "regex", or "regexNoCase" to change the search  type  (default is
2601   "literal"). Returns the starting position of the  match, or -1 if nothing
2602   matched. Also returns the ending position  of the match in $search_end.
2604 **search_string( string, search_for, start [, search_type, direction] )** 
2606   Built-in macro subroutine for searching a string. Arguments are 1: string to
2607   search in, 2: string to search for, 3: starting position. Optional arguments
2608   may include the strings: "wrap" to make the search wrap around the beginning
2609   or end of the string, "backward" or "forward" to change the search direction
2610   ("forward" is the default), "literal", "case", "word", "caseWord", "regex",
2611   or "regexNoCase" to change the search type (default is "literal"). Returns
2612   the starting position of the match, or -1 if nothing matched. Also returns
2613   the ending position of the match in $search_end.
2615 **select( start, end )**  
2616   Selects (with the primary selection) text in the current buffer between a
2617   starting and ending position.
2619 **select_rectangle( start, end, left, right )**  
2620   Selects a rectangular area of text between a starting and ending position,
2621   and confined horizontally to characters displayed between positions "left",
2622   and "right".
2624 ..Disabled for 5.4 release.
2625 ..**set_backlight_string( [string] )**
2626 ..  Applies the given string, which should be in the format of the
2627 ..  nedit*backlightCharTypes X resource, to the current text window, turning on
2628 ..  backlighting.  If the value of the string passed is "default", or if no
2629 ..  parameter is passed, the nedit.backlightCharTypes X resource's own value will
2630 ..  be used.  If the empty string, "", is passed, backlighting will be turned
2631 ..  off.
2633 **set_cursor_pos( position )**
2634   Set the cursor position for the current window.
2636 **shell_command( command, input_string )**  
2637   Executes a shell command, feeding it input from input_string. On completion,
2638   output from the command is returned as the function value, and the command's
2639   exit status is returned in the global variable $shell_cmd_status.
2641 **split(string, separation_string [, search_type])**
2642   Splits a string using the separator specified. Optionally the search_type
2643   argument can specify how the separation_string is interpreted. The default 
2644   is "literal". The returned value is an array with keys beginning at 0.
2646 **string_dialog( message, btn_1_label, btn_2_label, ... )**  
2647   Pops up a dialog prompting the user to enter information. The first argument
2648   is a string to show in the message area of the dialog. Up to nine additional
2649   optional arguments represent labels for buttons to appear along the bottom of
2650   the dialog. Returns the string entered by the user as the function value,
2651   and number of the button pressed (the first button is number 1), in
2652   $string_dialog_button. If the user closes the dialog via the window close
2653   box, the function returns the empty string, and $string_dialog_button returns
2654   0.
2656 **string_compare(string1, string2 [, consider-case])**
2657   Compare two  strings and return 0 if they are equal, -1 if string1 is less
2658   than  string2 or 1 if string1 is greater than string2. The values for the
2659   optional consider-case argument is either "case" or "nocase". The default 
2660   is to do a case sensitive comparison.
2662 **string_to_clipboard( string )**  
2663   Copy the contents of a macro string to the clipboard.
2665 **substring( string, start, end )**  
2666   Returns the portion of a string between a starting and ending position.
2668 **t_print( string1, string2, ... )**  
2669   Writes strings to the terminal (stdout) from which NEdit was started.
2671 **tolower( string )**
2672   Return an all lower-case version of string.
2674 **toupper( string )**
2675   Return an all upper-case version of string.
2677 **valid_number( string )**
2678   Returns 1 if the string can be converted to a number without error
2679   following the same rules that the implicit conversion would. Otherwise 0.
2681 **write_file( string, filename )**  
2682   Writes a string (parameter 1) to a file named in parameter 2. Returns 1 on
2683   successful write, or 0 if unsuccessful.
2686 3>Deprecated Functions
2688   Some functions are included only for supporting legacy macros. You should not
2689   use any of these functions in any new macro you write. Among these are all
2690   action routines with hyphens in their names; use underscores instead
2691   ('find-dialog' -> 'find_dialog').
2693 **match()**
2694   **DEPRECATED** Use select_to_matching() instead.
2696    ----------------------------------------------------------------------
2698 Range Sets
2699 ----------
2701   A rangeset is a set of ranges. A range is a contiguous range of characters
2702   defined by its start and end position in the document.  The user can
2703   create rangesets, identified by arbitrary integers (chosen by the editor when
2704   the rangesets are created), and each range within a rangeset is identified by
2705   a numeric index, counting from 1, in the order of appearance in the text
2706   buffer.  The ranges are adjusted when modifications are made to the text 
2707   buffer: they shuffle around when characters are added or deleted.  However,
2708   ranges within a set will coalesce if the characters between them are removed,
2709   or a new range is added to the set which bridges or overlaps others.
2710   
2711   Using rangesets allows non-contiguous bits of the text to be identified as a
2712   group.
2714   Rangesets can be assigned a background color: characters within a range of a
2715   rangeset will have the background color of the rangeset. If more than one
2716   rangeset includes a given character, its background color will be that of the
2717   most recently created rangeset which has a color defined.
2718   
2719   Rangesets must be created using the rangeset_create() function, which 
2720   will return an identifier for the newly-created rangeset.  This identifier
2721   is then passed to the other rangeset functions to manipulate the rangeset.
2722     
2723   There is a limit to the number of rangesets which can exist at any time -
2724   currently up to 63 in each document.  Care should be taken to destroy
2725   any rangesets which are no longer needed, by using the rangeset_destroy()
2726   function, if this limit is attained.
2728   Rangesets can be named: this is useful for macros which need a fixed
2729   identification for rangesets which are used for the same purpose in
2730   different documents.  Although a new rangeset's number is arbitrary, its
2731   name can be fixed.  This is done using the rangeset_set_name() function. 
2732   Note that rangeset names within a particular document may not be unique.
2733   For this reason, the rangeset_get_by_name() function returns an array of
2734   identifiers, which will be empty if the name has not been associated with
2735   a rangeset.
2737 4>How rangesets change with modifications
2739   When changes are made to the document text, ranges within each set are altered
2740   with it, according to their behavioral mode.  If changes are made outside of
2741   the ranges in a rangeset, each range simply maintains its size and adjusts its
2742   position to match the changes.  When text within a range is deleted, the
2743   range's length is reduced by the same amount. When changes involving new text
2744   are made within a range of the set, or to one of the extremities of a range,
2745   different behaviours may be desirable. The rangeset_set_mode() function allows
2746   these modes to be chosen.
2748   Note that the precise behaviour of these modes may change in future versions
2749   of NEdit.
2751   The available modes are:
2753   **maintain** or **ins_del** -
2754   Both these modes have the same behaviour.  New text added at the front of a
2755   range in a set is not added to the range; new text added within the range or
2756   at the end extends the range.  Replacement overlapping an extremity of the
2757   set acts as if the new text were added first, then the old text deleted. 
2758   This causes curtailment at the front of the range, extension at the end. 
2759   Replacement of the full text of the range removes the range from the set.
2760   The default behaviour for a newly created rangeset is **maintain**.
2762   **del_ins** -
2763   New text added at the front or end of a range in a set is not added to the
2764   range; new text added within the range extends the range.  Replacement
2765   overlapping an extremity of the set acts as if the old text were deleted
2766   first, then the new text added. This causes curtailment at either end.
2767   Replacement of the full text of the range removes the range from the set.
2769   **include** -
2770   New text added at the front or end of a range in a set extends the range, as
2771   does new text added within the range.  Replacement overlapping an extremity
2772   of the set acts as if the new text were added first, then the old text
2773   deleted.  This causes curtailment at the front of the range, extension at
2774   the end.  Replacement of the full text of the range adds the new text to the
2775   range if the start position of the replacement is at the range's start
2776   point.
2778   **exclude** -
2779   New text added at the front or end of a range in a set does not extend the
2780   range; new text added within the range extends the range.  Replacement
2781   overlapping an extremity causes curtailment of the range.  Replacement of
2782   the full text of the range removes the range from the set.
2784   **break** -
2785   New text added at the front or end of a range in a set does not extend the
2786   range; new text added within the range will split the range.  Replacement
2787   overlapping an extremity causes curtailment of the range.  Replacement of
2788   the full text of the range removes the range from the set.
2790 4>Notes
2792   A rangeset is manipulated ~only~ through macro routines. Rangesets
2793   can easily become very large, and may exceed the capacity of the running
2794   process.  Coloring relies on proper color names or specifications (such as
2795   the "#rrggbb" hexadecimal digit strings), and appropriate hardware support. If
2796   an invalid color name is given, the default background color is used instead. 
2797   Behaviours set using rangeset_set_mode() are subject to change in future
2798   versions.
2800 3>Rangeset read-only variables
2802 **$rangeset_list**
2803   array of active rangeset identifiers, with integer keys starting at 0,
2804   in the order the rangesets were defined.
2807 3>Rangeset functions
2809 **rangeset_create()**
2810 **rangeset_create( n )**
2811   Creates one or more new rangesets. The first form creates a single range
2812   set and returns its identifier; if there are no rangesets available it 
2813   returns 0. The second form creates n new rangesets, and returns an array 
2814   of the rangeset identifiers with keys beginning at 0. If the requested 
2815   number of rangesets is not available it returns an empty array.
2816   
2817 **rangeset_destroy( r )**
2818 **rangeset_destroy( array )**
2819   Deletes all information about a rangeset or a number of rangesets. The
2820   first form destroys the rangeset identified by r. The second form should 
2821   be passed an array of rangeset identifiers with keys beginning at 0 (i.e.
2822   the same form of array returned by rangeset_create(n); it destroys all the
2823   rangesets appearing in the array. If any of the rangesets do not exist,
2824   the function continues without errors. Does not return a value.
2825   
2826 **rangeset_add( r, [start, end] )**
2827 **rangeset_add( r, r0 )**
2828   Adds to the rangeset r. The first form adds the range identified by the
2829   current primary selection to the rangeset, unless start and end are defined,
2830   in which case the range they define is added. Returns the index of the 
2831   newly-added range within the rangeset. The second form adds all ranges in 
2832   the rangeset r0 to the rangeset r, and returns 0.
2833   
2834 **rangeset_subtract( r, [start, end] )**
2835 **rangeset_subtract( r, r0 )**
2836   Removes from the rangeset r. The first form removes the range identified by
2837   the current primary selection from the rangeset, unless start and end are
2838   defined, in which case the range they define is removed. The second form
2839   removes all ranges in the rangeset r0 from the rangeset r. Does not return
2840   a value.
2842 **rangeset_invert( r )**
2843   Changes the rangeset r so that it contains all ranges not in r. Does not
2844   return a value.
2846 **rangeset_get_by_name( name )**
2847   Returns an array of active rangeset identifiers, with integer keys starting at 0,
2848   whose name matches name.
2850 **rangeset_info( r )**
2851   Returns an array containing information about the rangeset r. The array
2852   has the following keys: **defined** (whether a rangeset with identifier
2853   r is defined), **count** (the number of ranges in the rangeset), **color**
2854   (the current background color of the rangeset, an empty string if the
2855   rangeset has no color), **name** (the user supplied name of the rangeset,
2856   an empty string if the rangeset has no name), and **mode** (the name of the
2857   modify-response mode of the rangeset).
2859 **rangeset_range( r, [index] )**
2860   Returns details of a specific range in the rangeset r.  The range is 
2861   specified by index, which should be between 1 and n (inclusive), where
2862   n is the number of ranges in the rangeset.  The return value is an array
2863   containing the keys **start** (the start position of the range) and **end**
2864   (the end position of the range).  If index is not supplied, the region
2865   returned is the span of the entire rangeset (the region starting at the 
2866   start of the first range and ending at the end of the last).  If index
2867   is outside the correct range of values, the function returns an empty array.
2869 **rangeset_includes( r, pos )**
2870   Returns the index of the range in rangeset r which includes pos; returns
2871   0 if pos is not contained in any of the ranges of r.  This can also be used
2872   as a simple true/false function which returns true if pos is contained in
2873   the rangeset.
2874   
2875 **rangeset_set_color( r, color )**
2876   Attempts to apply the color as a background color to the ranges of r. If
2877   color is at empty string, removes the coloring of r.  No check is made 
2878   regarding the validity of color: if the color is invalid (a bad name,
2879   or not supported by the hardware) this has unpredictable effects.
2881 **rangeset_set_name( r, name )**
2882   Apply the name to the rangeset r.
2884 **rangeset_set_mode( r, type )**
2885   Changes the behaviour of the rangeset r when modifications to the text
2886   buffer occur.  type can be one of the following: "maintain" (the default),
2887   "break", "include", "exclude", "ins_del" or "del_ins". (These modes are
2888   described above.)
2891 Highlighting Information
2892 ------------------------
2894   The user can interrogate the current window to determine the color
2895   highlighting used on a particular piece of text. The following functions
2896   provide information on the highlighting pattern against which text at a
2897   particular position has been matched, its style, color and font attributes
2898   (whether the font is supposed to be bold and/or italic).
2900   These macro functions permit macro writers to generate formatted output which
2901   allows NEdit highlighting to be reproduced. This is suitable for the
2902   generation of HTML or Postscript output, for example.
2903   
2904   Note that if any of the functions is used while in Plain mode or while syntax
2905   highlighting is off, the behaviour is undefined.
2907 **get_pattern_by_name( pattern_name )**
2908   Returns an array containing the pattern attributes for pattern 'pattern_name'.
2909   The elements in this array are:
2911 * **style** -- Highlight style name
2913   If 'pattern_name' is invalid, an empty array is returned.
2915 **get_pattern_at_pos( pos )**
2916   Returns an array containing the pattern attributes of the character at
2917   position 'pos'. The elements in this array are:
2919 * **pattern** -- Highlight pattern name
2920 * **style** -- Highlight style name
2921 * **extent** -- The length in the text which uses the same highlighting pattern
2923   The 'extent' value is measured from position 'pos' going right/down (forward
2924   in the file) only.
2926   If 'pos' is invalid, an empty array is returned.
2928 **get_style_by_name( style_name )**
2929   Returns an array containing the style attributes for style 'style_name'.
2930   The elements in this array are:
2932 * **bold** -- '1' if style is bold, '0' otherwise
2933 * **italic** -- '1' if style is italic, '0' otherwise
2934 * **color** -- Name of the style's color
2935 * **background** -- Name of the background color, if any
2937   The colors use the names specified in the color definitions for the style.
2938   These will either be names matching those the X server recognises, or RGB
2939   (red/green/blue) specifications.
2941   If 'style_name' is invalid, an empty array is returned.
2943 **get_style_at_pos( pos )**
2944   Returns an array containing the style attributes of the character at
2945   position 'pos'. The elements in this array are:
2947 * **style** -- Name of the highlight style
2948 * **bold** -- '1' if style is bold, '0' otherwise
2949 * **italic** -- '1' if style is italic, '0' otherwise
2950 * **color** -- Name of the style's color
2951 * **rgb** -- Color's RGB values ('#rrggbb')
2952 * **background** -- Name of the background color, if any
2953 * **back_rgb** -- Background color's RGB values ('#rrggbb')
2954 * **extent** -- The length in the text which uses the same highlight style
2956   The colors use the names specified in the color definitions for the style.
2957   These will either be names matching those the X server recognises, or RGB
2958   specifications. The values for 'rgb' and 'back_rgb' contain the actual color
2959   values allocated by the X server for the window. If the X server cannot
2960   allocate the specified (named) color exactly, the RGB values in these
2961   entries may not match the specified ones.
2963   The 'extent' value is measured from position 'pos' going right/down (forward
2964   in the file) only.
2966   If 'pos' is invalid, an empty array is returned.
2968    ----------------------------------------------------------------------
2970 Action Routines
2971 ---------------
2973   All of the editing capabilities of NEdit are represented as a special type of
2974   subroutine, called an action routine, which can be invoked from both macros
2975   and translation table entries (see "Key_Binding_" in the
2976   Customizing section of the Help menu).
2979 3>Actions Representing Menu Commands
2981     File Menu                 Search Menu
2982     -----------------------   -------------------------
2983     new()                     find()
2984     open()                    find_dialog()
2985     open_dialog()             find_again()
2986     open_selected()           find_selection()
2987     close()                   replace()
2988     save()                    replace_dialog()
2989     save_as()                 replace_all()
2990     save_as_dialog()          replace_in_selection()
2991     revert_to_saved()         replace_again()
2992     include_file()            goto_line_number()
2993     include_file_dialog()     goto_line_number_dialog()
2994     load_macro_file()         goto_selected()
2995     load_macro_file_dialog()  mark()
2996     load_tags_file()          mark_dialog()
2997     load_tags_file_dialog()   goto_mark()
2998     unload_tags_file()        goto_mark_dialog()
2999     load_tips_file()          goto_matching()
3000     load_tips_file_dialog()   select_to_matching()
3001     unload_tips_file()        find_definition()
3002     print()                   show_tip()
3003     print_selection()         
3004     exit()                    Shell Menu
3005                               -------------------------
3006     Edit Menu                 filter_selection_dialog()
3007     -----------------------   filter_selection()
3008     undo()                    execute_command()
3009     redo()                    execute_command_dialog()
3010     delete()                  execute_command_line()
3011     select_all()              shell_menu_command()
3012     shift_left()              
3013     shift_left_by_tab()       Macro Menu
3014     shift_right()             -------------------------
3015     shift_right_by_tab()      macro_menu_command()
3016     uppercase()               repeat_macro()
3017     lowercase()               repeat_dialog()
3018     fill_paragraph()          
3019     control_code_dialog()     Windows Menu
3020                               -------------------------
3021                               split_pane()
3022                               close_pane()
3023                               detach_document()
3024                               move_document_dialog()
3027   An action representing a menu command is usually named the same as its
3028   corresponding menu item except that all punctuation is removed, all letters
3029   are changed to lower case, and spaces are replaced with underscores.  To
3030   present a dialog to ask the user for input, use the actions with the
3031   `_dialog` suffix. Actions without the `_dialog` suffix take the information
3032   from the routine's arguments (see below).  
3034 3>Menu Action Routine Arguments
3036   Arguments are text strings enclosed in quotes. Below are the menu action
3037   routines which take arguments.  Optional arguments are enclosed in [].
3039     **new**( ["tab" | "window" | "prefs" | "opposite"] )
3041     **close**( ["prompt" | "save" | "nosave"] )
3042     
3043     **execute_command**( shell-command )
3044     
3045     **filter_selection**( shell-command )
3046     
3047     **find**( search-string [, ~search-direction~] [, ~search-type~] 
3048        [, ~search-wrap~] )
3049     
3050     **find_again**( [~search-direction~] [, ~search-wrap~] )
3051     
3052     **find_definition**( [tag-name] )
3053     
3054     **find_dialog**( [~search-direction~] [, ~search-type~] 
3055        [, ~keep-dialog~] )
3056     
3057     **find_selection**( [~search-direction~] [, ~search-wrap~] 
3058        [, ~non-regex-search-type~] )
3059     
3060     **goto_line_number**( [~line-number~] [, ~column-number~] )
3061     
3062     **goto_mark**( ~mark-letter~ )
3063     
3064     **include_file**( ~filename~ )
3065     
3066     **load_tags_file**( ~filename~ )
3067     
3068     **macro_menu_command**( ~macro-menu-item-name~ )
3069     
3070     **mark**( ~mark-letter~ )
3071     
3072     **open**( ~filename~ )
3073     
3074     **replace**( search-string, replace-string, 
3075        [, ~search-direction~] [, ~search-type~] [, ~search-wrap~] )
3076        
3077     **replace_again**( [~search-direction~] [, ~search-wrap~] )
3078     
3079     **replace_all**( search-string, replace-string [, ~search-type~] )
3081     **replace_dialog**( [~search-direction~] [, ~search-type~]
3082        [, ~keep-dialog~] )
3083     
3084     **replace_in_selection**( search-string, 
3085        replace-string [, ~search-type~] )
3086        
3087     **save_as**( ~filename~ )
3088     
3089     **shell_menu_command**( ~shell-menu-item-name~ )
3090     
3091     **unload_tags_file**( ~filename~ )
3093     **----------- Some notes on argument types above -----------**
3095     ~Arguments to new()~
3096                    "tab":      Open a new tab
3097                    "window":   Open a new window
3098                    "prefs":    Follow the user's tab/window 
3099                                preference
3100                    "opposite": Opposite of user's tab/window 
3101                                preference
3102                    Default behaviour is "prefs".
3104     ~filename~       Path names are relative to the directory from
3105                    which NEdit was started. Shell interpreted 
3106                    wildcards and `~' are not expanded.
3108     ~keep-dialog~    Either "keep" or "nokeep".
3110     ~mark-letter~    The mark command limits users to single 
3111                    letters. Inside of macros, numeric marks are
3112                    allowed, which won't interfere with marks set
3113                    by the user.
3115     ~macro-menu-item-name~
3116                    Name of the command exactly as specified in 
3117                    the Macro Menu dialogs.
3118                     
3119     ~non-regex-search-type~ 
3120                    Either "literal", "case", "word", or 
3121                    "caseWord".
3123     ~search-direction~
3124                    Either "forward" or "backward".
3126     ~search-type~    Either "literal", "case", "word", 
3127                    "caseWord", "regex", or "regexNoCase".
3129     ~search-wrap~    Either "wrap" or "nowrap".
3131     ~shell-menu-item-name~
3132                    Name of the command exactly as specified in 
3133                    the Shell Menu dialogs.
3135 3>Window Preferences Actions
3137 **set_auto_indent( "off" | "on" | "smart" )**
3138   Set auto indent mode for the current window.
3140 **set_em_tab_dist( em-tab-distance )**
3141   Set the emulated tab size. An em-tab-distance value of 
3142   0 or -1 translates to no emulated tabs. Em-tab-distance must 
3143   be smaller than 1000.
3145 **set_fonts( font-name, italic-font-name, bold-font-name, bold-italic-font-name )**
3146   Set all the fonts used for the current window.
3148 **set_highlight_syntax( [0 | 1] )**
3149   Set syntax highlighting mode for the current window. 
3150   A value of 0 turns it off and a value of 1 turns it on. 
3151   If no parameters are supplied the option is toggled.
3153 **set_incremental_backup( [0 | 1] )**
3154   Set incremental backup mode for the current window. 
3155   A value of 0 turns it off and a value of 1 turns it on. 
3156   If no parameters are supplied the option is toggled.
3158 **set_incremental_search_line( [0 | 1] )**
3159   Show or hide the incremental search line for the current window. 
3160   A value of 0 turns it off and a value of 1 turns it on. 
3161   If no parameters are supplied the option is toggled.
3163 **set_language_mode( language-mode )**
3164   Set the language mode for the current window. If the language mode is 
3165   "" or unrecognized, it will be set to Plain.
3167 **set_locked( [0 | 1] )**
3168   This only affects the locked status of a file, not it's read-only 
3169   status. Permissions are NOT changed. 
3170   A value of 0 turns it off and a value of 1 turns it on. 
3171   If no parameters are supplied the option is toggled.
3173 **set_make_backup_copy( [0 | 1] )**
3174   Set whether backup copies are made during saves for the current window. 
3175   A value of 0 turns it off and a value of 1 turns it on. 
3176   If no parameters are supplied the option is toggled.
3178 **set_overtype_mode( [0 | 1] )**
3179   Set overtype mode for the current window. 
3180   A value of 0 turns it off and a value of 1 turns it on. 
3181   If no parameters are supplied the option is toggled.
3183 **set_show_line_numbers( [0 | 1] )**
3184   Show or hide line numbers for the current window. 
3185   A value of 0 turns it off and a value of 1 turns it on. 
3186   If no parameters are supplied the option is toggled.
3188 **set_show_matching( "off" | "delimiter" | "range" )**
3189   Set show matching (...) mode for the current window.
3191 **set_match_syntax_based( [0 | 1] )**
3192   Set whether matching should be syntax based for the current window.
3194 **set_statistics_line( [0 | 1] )**
3195   Show or hide the statistics line for the current window. 
3196   A value of 0 turns it off and a value of 1 turns it on. 
3197   If no parameters are supplied the option is toggled.
3199 **set_tab_dist( tab-distance )**
3200   Set the size of hardware tab spacing. Tab-distance must 
3201   must be a value greater than 0 and no greater than 20.
3203 **set_use_tabs( [0 | 1] )**
3204   Set whether tabs are used for the current window. 
3205   A value of 0 turns it off and a value of 1 turns it on. 
3206   If no parameters are supplied the option is toggled.
3208 **set_wrap_margin( wrap-width )**
3209   Set the wrap width for text wrapping of the current window. A value
3210   of 0 means to wrap at window width.
3212 **set_wrap_text( "none" | "auto" | "continuous" )**
3213   Set wrap text mode for the current window.
3215 3>Keyboard-Only Actions
3217   In addition to the arguments listed in the call descriptions below, any
3218   routine involving cursor movement can take the argument "extend", meaning,
3219   adjust the primary selection to the new cursor position. Routines which take
3220   the "extend" argument as well as mouse dragging operations for both primary
3221   and secondary selections can take the optional keyword "rect", meaning, make
3222   the selection rectangular. Any routine that accepts the "scrollbar" argument
3223   will move the display but not the cursor or selection. Routines that accept
3224   the "nobell" argument will fail silently without beeping, when that argument
3225   is supplied.
3227 **backward_character( ["nobell"] )**
3228   Moves the cursor one character to the left.
3230 **backward_paragraph(["nobell"] )**
3231   Moves the cursor to the beginning of the paragraph, or
3232   if the cursor is already at the beginning of a paragraph, moves the cursor to
3233   the beginning of the previous paragraph.  Paragraphs are defined as regions
3234   of text delimited by one or more blank lines.
3236 **backward_word( ["nobell"] )**
3237   Moves the cursor to the beginning of a word, or, if the
3238   cursor is already at the beginning of a word, moves the cursor to the
3239   beginning of the previous word.  Word delimiters are user-settable, and
3240   defined by the X resource wordDelimiters.
3242 **beginning_of_file( ["scrollbar"] )**
3243   Moves the cursor to the beginning of the file.
3245 **beginning_of_line( ["absolute"] )** 
3246   Moves the cursor to the beginning of the line. If
3247   "absolute" is given, always moves to the absolute beginning of line,
3248   regardless of the text wrapping mode.
3250 **beginning_of_selection()**
3251   Moves the cursor to the beginning of the selection
3252   without disturbing the selection.
3254 **copy_clipboard()**
3255   Copies the current selection to the clipboard.
3257 **copy_primary()**
3258   Copies the primary selection to the cursor.
3260 **copy_to()**
3261   If a secondary selection exists, copies the secondary selection to
3262   the cursor.  If no secondary selection exists, copies the primary selection
3263   to the pointer location.
3265 **copy_to_or_end_drag()**
3266   Completes either a secondary selection operation, or a
3267   primary drag.  If the user is dragging the mouse to adjust a secondary
3268   selection, the selection is copied and either inserted at the cursor
3269   location, or, if pending-delete is on and a primary selection exists in the
3270   window, replaces the primary selection.  If the user is dragging a block of
3271   text (primary selection), completes the drag operation and leaves the text at
3272   it's current location.
3274 **cut_clipboard()**
3275   Deletes the text in the primary selection and places it in
3276   the clipboard.
3278 **cut_primary()**
3279   Copies the primary selection to the cursor and deletes it at
3280   its original location.
3282 **delete_selection()**
3283   Deletes the contents of the primary selection.
3285 **delete_next_character( ["nobell"] )**
3286   If a primary selection exists, deletes its contents. 
3287   Otherwise, deletes the character following the cursor.
3289 **delete_previous_character( ["nobell"] )**
3290   If a primary selection exists, deletes its
3291   contents.  Otherwise, deletes the character before the cursor.
3293 **delete_next_word( ["nobell"] )**
3294   If a primary selection exists, deletes its contents. 
3295   Otherwise, deletes the word following the cursor.
3297 **delete_previous_word( ["nobell"] )**
3298   If a primary selection exists, deletes its contents. 
3299   Otherwise, deletes the word before the cursor.
3301 **delete_to_start_of_line( ["nobell", "wrap"] )**
3302   If a primary selection exists, deletes its contents.  Otherwise, deletes the
3303   characters between the cursor and the start of the line. If "wrap" is
3304   given, deletes to the previous wrap point or beginning of line, whichever 
3305   is closest.
3307 **delete_to_end_of_line( ["nobell", "absolute"] )**
3308   If a primary selection exists, deletes its contents. 
3309   Otherwise, deletes the characters between the cursor and the end of the line.
3310   If "absolute" is given, always deletes to the absolute end of line, regardless
3311   of the text wrapping mode.
3313 **deselect_all()**
3314   De-selects the primary selection.
3316 **end_of_file( ["scrollbar"] )**
3317   Moves the cursor to the end of the file.
3319 **end_of_line( ["absolute"] )** 
3320   Moves the cursor to the end of the line.  If
3321   "absolute" is given, always moves to the absolute end of line, regardless
3322   of the text wrapping mode.
3324 **end_of_selection()**
3325   Moves the cursor to the end of the selection without
3326   disturbing the selection.
3328 **exchange( ["nobell"] )**
3329   Exchange the primary and secondary selections.
3331 **extend_adjust()**
3332   Attached mouse-movement events to begin a selection between
3333   the cursor and the mouse, or extend the primary selection to the mouse
3334   position.
3336 **extend_end()**
3337   Completes a primary drag-selection operation.
3339 **extend_start()**
3340   Begins a selection between the cursor and the mouse.  A
3341   drag-selection operation can be started with either extend_start or
3342   grab_focus.
3344 **focus_pane( [relative-pane] | [positive-index] | [negative-index] )**
3345   Move the focus to the requested pane.
3346   Arguments can be specified in the form of a relative-pane 
3347   ("first", "last", "next", "previous"), a positive-index 
3348   (numbers greater than 0, 1 is the same as "first") or a
3349   negative-index (numbers less than 0, -1 is the same as "last").
3350   
3351 **forward_character()**
3352   Moves the cursor one character to the right.
3354 **forward_paragraph( ["nobell"] )**
3355   Moves the cursor to the beginning of the next paragraph. 
3356   Paragraphs are defined as regions of text delimited by one or more blank
3357   lines.
3359 **forward_word( ["tail"] ["nobell"] )**
3360   Moves the cursor to the beginning of the next word.  Word
3361   delimiters are user-settable, and defined by the X resource wordDelimiters.
3362   If the "tail" argument is supplied the cursor will be moved to 
3363   the end of the current word or the end of the next word, if the 
3364   cursor is between words.
3366 **grab_focus()**
3367   Moves the cursor to the mouse pointer location, and prepares for
3368   a possible drag-selection operation (bound to extend_adjust), or multi-click
3369   operation (a further grab_focus action).  If a second invocation of grab
3370   focus follows immediately, it selects a whole word, or a third, a whole line.
3372 **insert_string( "string" )**
3373   If pending delete is on and the cursor is inside the
3374   selection, replaces the selection with "string".  Otherwise, inserts "string"
3375   at the cursor location.
3377 **key_select( "direction" [,"nobell"] )**
3378   Moves the cursor one character in "direction"
3379   ("left", "right", "up", or "down") and extends the selection.  Same as
3380   forward/backward-character("extend"), or process-up/down("extend"), for
3381   compatibility with previous versions.
3383 **move-destination()**
3384   Moves the cursor to the pointer location without
3385   disturbing the selection.  (This is an unusual way of working.  We left it in
3386   for compatibility with previous versions, but if you actually use this
3387   capability, please send us some mail, otherwise it is likely to disappear in
3388   the future.
3390 **move_to()**
3391   If a secondary selection exists, deletes the contents of the
3392   secondary selection and inserts it at the cursor, or if pending-delete is on
3393   and there is a primary selection, replaces the primary selection.  If no
3394   secondary selection exists, moves the primary selection to the pointer
3395   location, deleting it from its original position.
3397 **move_to_or_end_drag()**
3398   Completes either a secondary selection operation, or a
3399   primary drag.  If the user is dragging the mouse to adjust a secondary
3400   selection, the selection is deleted and either inserted at the cursor
3401   location, or, if pending-delete is on and a primary selection exists in the
3402   window, replaces the primary selection.  If the user is dragging a block of
3403   text (primary selection), completes the drag operation and deletes the text
3404   from it's current location.
3406 **newline()**
3407   Inserts a newline character.  If Auto Indent is on, lines up the
3408   indentation of the cursor with the current line.
3410 **newline_and_indent()**
3411   Inserts a newline character and lines up the indentation
3412   of the cursor with the current line, regardless of the setting of Auto
3413   Indent.
3415 **newline_no_indent()**
3416   Inserts a newline character, without automatic
3417   indentation, regardless of the setting of Auto Indent.
3419 **next_page( ["stutter"] ["column"] ["scrollbar"] ["nobell"] )**
3420   Moves the cursor and scroll forward one page.
3421   The parameter "stutter" moves the cursor to the bottom of the display,
3422   unless it is already there, otherwise it will page down.
3423   The parameter "column" will maintain the preferred column while
3424   moving the cursor.
3426 **page_left( ["scrollbar"] ["nobell"] )**
3427   Move the cursor and scroll left one page.
3429 **page_right( ["scrollbar"] ["nobell"] )**
3430   Move the cursor and scroll right one page.
3432 **paste_clipboard()**
3433   Insert the contents of the clipboard at the cursor, or if
3434   pending delete is on, replace the primary selection with the contents of the
3435   clipboard.
3437 **previous_page( ["stutter"] ["column"] ["scrollbar"] ["nobell"] )**
3438   Moves the cursor and scroll backward one page.
3439   The parameter "stutter" moves the cursor to the top of the display,
3440   unless it is already there, otherwise it will page up.
3441   The parameter "column" will maintain the preferred column while
3442   moving the cursor.
3444 **process_bdrag()**
3445   Same as secondary_or_drag_start for compatibility with previous versions.
3447 **process_cancel()**
3448   Cancels the current extend_adjust, secondary_adjust, or
3449   secondary_or_drag_adjust in progress.
3451 **process_down( ["nobell", "absolute"] )**
3452   Moves the cursor down one line.  If "absolute" is given, always moves to the 
3453   next line in the text buffer, regardless of wrapping.
3455 **process_return()**
3456   Same as newline for compatibility with previous versions.
3458 **process_shift_down( ["nobell", "absolute"] )**
3459   Same as process_down("extend") for compatibility with previous versions.
3461 **process_shift_up( ["nobell", "absolute"] )**
3462   Same as process_up("extend") for compatibility with previous versions.
3464 **process_tab()**
3465   If tab emulation is turned on, inserts an emulated tab,
3466   otherwise inserts a tab character.
3468 **process_up( ["nobell", "absolute"] )**
3469   Moves the cursor up one line.  If "absolute" is given, always moves to the 
3470   previous line in the text buffer, regardless of wrapping.
3472 **raise_window([relative-window] | [positive-index] | [negative-index])**
3473   Raise the current focused window to the front if no argument is supplied.
3474   Arguments can be specified in the form of a relative-window 
3475   ("first", "last", "next", "previous"), a positive-index 
3476   (numbers greater than 0, 1 is the same as "last") or a
3477   negative-index (numbers less than 0, -1 is the same as "first").
3478   
3479 **scroll_down( nUnits, ["lines" | "pages"] )**
3480   Scroll the display down (towards the end of the file) by a given
3481   number of units, units being lines or pages. Default units are lines.
3483 **scroll_left( nPixels )**
3484   Scroll the display left by nPixels.
3486 **scroll_right( nPixels )**
3487   Scroll the display right by nPixels.
3489 **scroll_up( nUnits, ["lines" | "pages"] )**
3490   Scroll the display up (towards the beginning of the file) by a given
3491   number of units, units being lines or pages. Default units are lines.
3493 **scroll_to_line( lineNum )**
3494   Scroll to position line number lineNum at the top of
3495   the pane.  The first line of a file is line 1.
3497 **secondary_adjust()**
3498   Attached mouse-movement events to extend the secondary
3499   selection to the mouse position.
3501 **secondary_or_drag_adjust()**
3502   Attached mouse-movement events to extend the
3503   secondary selection, or reposition the primary text being dragged.  Takes two
3504   optional arguments, "copy", and "overlay".  "copy" leaves a copy of the
3505   dragged text at the site at which the drag began.  "overlay" does the drag in
3506   overlay mode, meaning the dragged text is laid on top of the existing text,
3507   obscuring and ultimately deleting it when the drag is complete.
3509 **secondary_or_drag_start()**
3510   To be attached to a mouse down event.  Begins drag
3511   selecting a secondary selection, or dragging the contents of the primary
3512   selection, depending on whether the mouse is pressed inside of an existing
3513   primary selection.
3515 **secondary_start()**
3516   To be attached to a mouse down event.  Begin drag selecting
3517   a secondary selection.
3519 **select_all()**
3520   Select the entire file.
3522 **self_insert()**
3523   To be attached to a key-press event, inserts the character
3524   equivalent of the key pressed.
3526    ----------------------------------------------------------------------
3528 Customizing
3529 ===========
3531 Customizing NEdit
3532 -----------------
3534   NEdit can be customized many different ways.  The most important
3535   user-settable options are presented in the Preferences menu, including all
3536   options that users might need to change during an editing session.  Options
3537   set in the Default Settings sub-menu of the Preferences menu can be preserved
3538   between sessions by selecting Save Defaults, which writes the changes to the
3539   preferences file.  See the section titled "Preferences_" for more details.
3541   User defined commands can be added to NEdit's Shell, Macro, and window
3542   background menus.  Dialogs for creating items in these menus can be found
3543   under Customize Menus in the Default Settings sub menu of the Preferences
3544   menu.
3546   For users who depend on NEdit every day and want to tune every excruciating
3547   detail, there are also X resources for tuning a vast number of such details,
3548   down to the color of each individual button.  See the section "X_Resources_"
3549   for more information, as well as a list of selected resources.
3551   The most common reason customizing your X resources for NEdit, however, is
3552   key binding.  While limited key binding can be done through Preferences
3553   settings (Preferences -> Default Settings -> Customize Menus), you can really
3554   only add keys this way, and each key must have a corresponding menu item. 
3555   Any significant changes to key binding should be made via the Translations
3556   resource and menu accelerator resources.  The sections titled "Key_Binding_"
3557   and "X_Resources_" have more information.
3558    ----------------------------------------------------------------------
3560 Preferences
3561 -----------
3563   The Preferences menu allows you to set options for both the current editing
3564   window, and default values for newly created windows and future NEdit
3565   sessions.  Options in the Preferences menu itself (not in the Default
3566   Settings sub-menu) take effect immediately and refer to the current window
3567   only.  Options in the Default Settings sub-menu provide initial settings for
3568   future windows created using the New or Open commands; options affecting all
3569   windows are also set here.
3570   Preferences set in the Default Settings sub-menu can be saved in a file that
3571   is automatically read by NEdit at startup time, by selecting Save Defaults.
3573 3>Preferences Menu
3575 **Default Settings**
3576   Menu of initial settings for future windows.  Generally the same as the
3577   options in the main part of the menu, but apply as defaults for future
3578   windows created during this NEdit session.  These settings can be saved using
3579   the Save Defaults command below, to be loaded automatically each time NEdit
3580   is started.
3582 **Save Defaults**
3583   Save the default options as set under Default Settings for future NEdit 
3584   sessions.
3586 **Statistics Line**
3587   Show the full file name, line number, and length of the file being edited.
3589 **Incremental Search Line**
3590   Keep the incremental search bar (Search -> Find Incremental) permanently
3591   displayed at the top of the window.
3593 **Show Line Numbers**
3594   Display line numbers to the right of the text.
3596 **Language Mode**
3597   Tells NEdit what language (if any) to assume, for selecting language-specific
3598   features such as highlight patterns and smart indent macros, and setting
3599   language specific preferences like word delimiters, tab emulation, and
3600   auto-indent.  See Features for Programming -> Programming_with_NEdit_ for
3601   more information.
3603 **Auto Indent**
3604   Setting Auto Indent "on" maintains a running indent (pressing the Return key
3605   will line up the cursor with the indent level of the previous line).  If
3606   smart indent macros are available for the current language mode, smart indent
3607   can be selected and NEdit will attempt to guess proper language indentation
3608   for each new line.  See Help -> Features for Programming -> Automatic Indent
3609   for more information.
3611 **Wrap**
3612   Choose between two styles of automatic wrapping or none.  Auto Newline wrap,
3613   wraps text at word boundaries when the cursor reaches the right margin, by
3614   replacing the space or tab at the last word boundary with a newline
3615   character.  Continuous Wrap wraps long lines which extend past the right
3616   margin. Continuous Wrap mode is typically used to produce files where
3617   newlines are omitted within paragraphs, to make text filling automatic (a
3618   kind of poor-man's word processor).  Text of this style is common on Macs and
3619   PCs but is not necessarily supported very well under Unix (except in programs
3620   which deal with e-mail, for which it is often the format of choice).
3622 **Wrap Margin**
3623   Set margin for Auto Newline Wrap, Continuous Wrap, and Fill Paragraph.  Lines
3624   may, be wrapped at the right margin of the window, or the margin can be set
3625   at a specific column.
3627 **Tab Stops**
3628   Set the tab distance (number of characters between tab stops) for tab
3629   characters, and control tab emulation and use of tab characters in padding
3630   and emulated tabs.
3632 **Text Font...**
3633   Change the font(s) used to display text (fonts for menus and dialogs must be
3634   set using X resources for the text area of the window). See below for more
3635   information.
3637 **Highlight Syntax**
3638   If NEdit recognizes the language being edited, and highlighting patterns are
3639   available for that language, use fonts and colors to enhance viewing of the
3640   file.  (See Help -> Features for Programming -> Syntax Highlighting for more
3641   information.
3643 **Make Backup Copy**
3644   On Save, write a backup copy of the file as it existed before the Save
3645   command with the extension .bck (Unix only).
3647 **Incremental Backup**
3648   Periodically make a backup copy of the file being edited under the name
3649   `~filename` on Unix or `_filename` on VMS (see Crash_Recovery_).
3651 **Show Matching (..)**
3652   Momentarily highlight matching parenthesis, brackets, and braces, or the
3653   range between them, when one of these characters is typed, or when the
3654   insertion cursor is positioned after it. Delimiter only highlights the
3655   matching delimiter, while Range highlights the whole range of text between
3656   the matching delimiters.
3657   
3658   Optionally, the matching can make use of syntax information if syntax
3659   highlighting is enabled. Alternatively, the matching is purely character
3660   based. In general, syntax based matching results in fewer false matches.
3662 **Overtype**
3663   In overtype mode, new characters entered replace the characters in front of
3664   the insertion cursor, rather than being inserted before them.
3666 **Read Only**
3667   Lock the file against accidental modification.  This temporarily prevents the
3668   file from being modified in this NEdit session. Note that this is different
3669   from setting the file protection.
3671 3>Preferences -> Default Settings Menu
3673   Options in the Preferences -> Default Settings menu have the same meaning as
3674   those in the top-level Preferences menu, except that they apply to future
3675   NEdit windows and future NEdit sessions if saved with the Save Defaults
3676   command.  Additional options which appear in this menu are:
3678 **Language Modes**
3679   Define language recognition information (for determining language mode from
3680   file name or content) and set language specific preferences.
3682 **Tag Collisions**
3683   How to react to multiple tags for the same name.  Tags are described in the
3684   section: Features for Programmers -> Finding Declarations (ctags).  In Show
3685   All mode, all matching tags are displayed in a dialog.  In Smart mode, if one
3686   of the matching tags is in the current window, that tag is chosen, without
3687   displaying the dialog.
3689 **Colors...**
3690   Change the colors used to display text.  The "Matching (..)" fields change the
3691   colors that matching parens, brackets and braces are flashed when the "Show
3692   Matching (..)" option is enabled.  Note that the foreground colors for plain
3693   text, selected text, and matching paren flashing only apply when syntax
3694   highlighting is disabled.  When syntax highlighting is enabled, text (even
3695   text that appears plain) will always be colored according to its highlighting
3696   style. (For information on changing syntax highlighting styles and matching
3697   patterns use see  Help -> Features for Programming -> Syntax_Highlighting_.)
3699 **Customize Menus**
3700   Add/remove items from the Shell, Macro, and window background menus (see
3701   below).
3703 **Customize Window Title**
3704   Opens a dialog where the information to be displayed in the window's title
3705   field can be defined and tested. The dialog contains a Help button, providing
3706   further information about the options available.
3708 **Searching**
3709   Options for controlling the behavior of Find and Replace commands:
3711   ~Verbose~ - 
3712   Presents search results in dialog form, asks before wrapping a
3713   search back around the beginning (or end) of the file 
3714   (unless Beep On Search Wrap is turned on).
3716   ~Wrap Around~ - 
3717   Search and Replace operations wrap around the beginning (or end) of the file.
3719   ~Beep On Search Wrap~ - 
3720   Beep when Search and Replace operations wrap around the beginning (or end) of
3721   the file (only if Wrap Around is turned on).
3723   ~Keep Dialogs Up~ - 
3724   Don't pop down Replace and Find boxes after searching.
3726   ~Default Search Style~ - 
3727   Initial setting for search type in Find and Replace dialogs.
3729   ~Default Replace Scope~ - 
3730   [THIS OPTION IS ONLY PRESENT WHEN NEDIT WAS COMPILED WITH THE 
3731    -DREPLACE_SCOPE FLAG TO SELECT AN ALTERNATIVE REPLACE DIALOG LAYOUT.]
3733   Initial setting for the scope in the Replace/Find dialog, when a selection
3734   exists. It can be either "In Window", "In Selection", or "Smart". "Smart"
3735   results in "In Window" if the size of the selection is smaller than 1 line,
3736   and to "In Selection" otherwise.
3738 **Syntax Highlighting**
3739   Program and configure enhanced text display for new or supported languages
3740   (See Features for Programming -> Syntax_Highlighting_).
3742 **Tabbed Editing**
3743   Options for controlling the tabbed interface:
3744   
3745   ~Open File in New Tab~ - 
3746   Open files in new tabs, else open files in new windows.
3747   
3748   ~Show Tab Bar~ - 
3749   Show/Hide the tab bar.
3750   
3751   ~Hide Tab Bar when only one Document is open~
3752   
3753   ~Next/Prev Tabs Across Windows~ - 
3754   Suppose there are two windows with three tabs in the first window and two tabs in
3755   the second window.  Enabling this option, if you are on the third tab in the
3756   first window, hitting Ctrl+PageDown would switch to the first tab in the second
3757   window (instead of switching to the first tab in the first window).
3758   
3759   ~Sort Tabs Alphabetically~
3761 **Show Tooltips**
3762   Show file name and path in a tooltip when moving the mouse pointer over a tab
3763   (See Basic Operations -> Tabbed_Editing_).
3765 **Terminate with Line Break on Save**
3766   Some UNIX tools expect that files end with a line feed. If this option is
3767   activated, NEdit will append one if required.
3769 **Sort Open Prev. Menu**
3770   Option to order the File -> Open Previous menu alphabetically, versus in
3771   order of last access.
3773 **Popups Under Pointer**
3774   Display pop-up dialogs centered on the current mouse position, as opposed to
3775   centered on the parent window.  This generally speeds interaction, and is
3776   essential for users who set their window managers so keyboard focus
3777   follows the mouse.
3779 **Auto-Scroll Near Window Top/Bottom**
3780   When this option is enabled the window will automatically scroll when the
3781   cursor comes 4 lines from the top or bottom of the window (except at the
3782   beginning of the file).  The number of lines can be customized with the
3783   nedit.autoScrollVPadding resource.
3785 **Warnings**
3786   Options for controlling the popping up of warning dialogs:
3787   
3788   ~File Modified Externally~ -
3789   Pop up a warning dialog when files get changed external to NEdit.
3790   
3791   ~Check Modified File Contents~ -
3792   If external file modification warnings are requested, also check the file
3793   contents iso. only the modification date.
3795   ~Exit Warnings~ -
3796   Ask before exiting when two or more files are open in an NEdit session.
3798 **Initial Window Size**
3799   Default size for new windows.
3801 3>Changing Font(s)
3803   The font used to display text in NEdit is set under Preferences -> Text Font
3804   (for the current window), or Preferences -> Default Settings Text Font (for
3805   future windows).  These dialogs also allow you to set fonts for syntax
3806   highlighting.  If you don't intend to use syntax highlighting, you can ignore
3807   most of the dialog, and just set the field labeled Primary Font.
3809   Unless you are absolutely certain about the types of files that you will be
3810   editing with NEdit, you should choose a fixed-spacing font.  Many, if not
3811   most, plain-text files are written expecting to be viewed with fixed
3812   character spacing, and will look wrong with proportional spacing.  NEdit's
3813   filling, wrapping, and rectangular operations will also work strangely if you
3814   choose a proportional font.
3816   Note that in the font browser (the dialog brought up by the Browse...
3817   button), the subset of fonts which are shown is narrowed depending on the
3818   characteristics already selected.  It is therefore important to know that you
3819   can unselect characteristics from the lists by clicking on the selected items
3820   a second time.
3822   Fonts for syntax highlighting should ideally match the primary font in both
3823   height and spacing.  A mismatch in spacing will result in similar distortions
3824   as choosing a proportional font: column alignment will sometimes look wrong,
3825   and rectangular operations, wrapping, and filling will behave strangely.  A
3826   mismatch in height will cause windows to re-size themselves slightly when
3827   syntax highlighting is turned on or off, and increase the inter- line spacing
3828   of the text.  Unfortunately, on some systems it is hard to find sets of fonts
3829   which match exactly in height.
3831 3>Customizing Menus
3833   You can add or change items in the Shell, Macro, and window background menus
3834   under Preferences -> Default Settings -> Customize Menus.  When you choose
3835   one of these, you will see a dialog with a list of the current
3836   user-configurable items from the menu on the left.  To change an existing
3837   item, select it from the list, and its properties will appear in the
3838   remaining fields of the dialog, where you may change them.  Selecting the
3839   item "New" from the list allows you to enter new items in the menu.
3841   Hopefully most of the characteristics are self explanatory, but here are a
3842   few things to note:
3844   Accelerator keys are keyboard shortcuts which appear on the right hand side
3845   of the menus, and allow you avoid pulling down the menu and activate the
3846   command with a single keystroke.  Enter accelerators by typing the keys
3847   exactly as you would to activate the command.
3849   Mnemonics are a single letter which should be part of the menu item name,
3850   which allow users to traverse and activate menu items by typing keys when the
3851   menu is pulled down.
3853   In the Shell Command field of the Shell Commands dialog, the % character
3854   expands to the name (including directory path) of the file in the window.  To
3855   include a % character in the command, use %%.
3857   The Menu Entry field can contain special characters for constructing
3858   hierarchical sub-menus, and for making items which appear only in certain
3859   language modes.  The right angle bracket character ">" creates a sub-menu. 
3860   The name of the item itself should be the last element of the path formed
3861   from successive sub-menu names joined with ">".  Menu panes are called in to
3862   existence simply by naming them as part of a Menu Entry name.  To put several
3863   items in the same sub-menu, repeat the same hierarchical sequence for each. 
3864   For example, in the Macro Commands dialog, two items with menu entries: a>b>c
3865   and a>b>d would create a single sub menu under the macro menu called "a",
3866   which would contain a single sub-menu, b, holding the actual items, c and d:
3868       +---++---++---+
3869       |a >||b >||c  |
3870       +---++---+|d  |
3871                 +---+
3873   To qualify a menu entry with a language mode, simply add an at-sign "@@" at
3874   the end of the menu command, followed (no space) by a language mode name.  To
3875   make a menu item which appears in several language modes, append additional
3876   @@s and language mode names.  For example, an item with the menu entry:
3878     Make C Prototypes@@C@@C++
3880   would appear only in C and C++ language modes, and:
3882     Make Class Template@@C++
3884   would appear only in C++ mode.
3886   Menu items with no qualification appear in all language modes.
3888   If a menu item is followed by the single language qualification "@@*", that
3889   item will appear only if there are no applicable language-specific items of
3890   the same name in the same submenu.  For example, if you have the following
3891   three entries in the same menu:
3893     Make Prototypes@@C@@C++
3894     Make Prototypes@@Java
3895     Make Prototypes@@*
3897   The first will be available when the language mode is C or C++, the second
3898   when the language mode is Java, and for all other language modes (including
3899   the "Plain" non-language mode).  If the entry:
3901     Make Prototypes
3903   also exists, this will always appear, meaning that the menu will always have
3904   two "Make Prototypes" entries, whatever the language mode.
3906 3>The NEdit Preferences File
3908   The NEdit saved preferences file is an X resource file, and its contents can
3909   be moved into another X resource file (see X_Resources_).  One reason for
3910   doing so would be to attach server specific preferences, such as a default
3911   font to a particular X server.  Another reason for moving preferences into the
3912   X resource file would be to keep preferences menu options and resource
3913   settable options together in one place.
3914   Though the files are the same format, additional resources should not be added
3915   to the preference file since NEdit modifies this file by overwriting it
3916   completely.  Note also that the contents of the preference file take
3917   precedence over the values of X resources.
3918   Using Save Defaults after moving the contents of your preference file to your
3919   .Xdefaults file will re-create the preference file, interfering with the
3920   options that you have moved.
3921   The location of NEdit's preferences file depends on your environment:
3922   
3923 * The default place for the file is '$HOME/.nedit/nedit.rc',
3924 * if the variable $NEDIT_HOME is set in your environment it is located at '$NEDIT_HOME/nedit.rc',
3925 * you may also use old-style run control files; in this case, the preferences are stored in $HOME/.nedit.
3927   (For VMS, the file is in '$NEDIT_HOME/nedit.rc' if $NEDIT_HOME is set, in
3928   'SYS$LOGIN:.nedit' otherwise.)
3930 3>Sharing Customizations with Other NEdit Users
3932   If you have written macro or shell menu commands, highlight patterns, or
3933   smart-indent macros that you want to share with other NEdit users, you can
3934   make a file which they can load into their NEdit environment.
3936   To load such a file, start NEdit with the command:
3938      nedit -import <file>
3940   In the new NEdit session, verify that the imported patterns or macros do what
3941   you want, then select Preferences -> Save Defaults.  Saving incorporates the
3942   changes into the nedit preferences file, so the next time you run NEdit, you
3943   will not have to import the distribution file.
3945   Loading a customization file is automated, but creating one is not.  To
3946   produce a file to be imported by other users, you must make a copy of your own
3947   NEdit configuration file, and edit it, by hand, to remove everything but the
3948   few items of interest to the recipient.  Leave only the individual
3949   resource(s), and within those resources, only the particular macro, pattern,
3950   style, etc, that you wish to exchange.
3952   For example, to share a highlighting pattern set, you would include the
3953   patterns, any new styles you added, and language mode information only if the
3954   patterns are intended to support a new language rather than updating an
3955   existing one. For example:
3957      nedit.highlightPatterns:\
3958           My Language:1:0{\n\
3959                   Comment:"#":"$"::Comment::\n\
3960                   Loop Header:"^[ \\t]*loop:":::Loop::\n\
3961           }
3962      nedit.languageModes: My Language:.my::::::
3963      nedit.styles: Loop:blue:Bold
3965   Resources are in the format of X resource files, but the format of text
3966   within multiple-item resources like highlight patterns, language modes,
3967   macros, styles, etc., are private to NEdit.  Each resource is a string which
3968   ends at the first newline character not escaped with \, so you must be
3969   careful about how you treat ends of lines.  While you can generally just cut
3970   and paste indented sections, if something which was originally in the middle
3971   of a resource string is now at the end, you must remove the \ line
3972   continuation character(s) so it will not join the next line into the
3973   resource.  Conversely, if something which was originally at the end of a
3974   resource is now in the middle, you'll have to add continuation character(s)
3975   to make sure that the resource string is properly continued from beginning to
3976   end, and possibly newline character(s) (\n) to make sure that it is properly
3977   separated from the next item.
3978    ----------------------------------------------------------------------
3980 X Resources
3981 -----------
3983   NEdit has additional options to those provided in the Preferences menu which
3984   are set using X resources.  Like most other X programs, NEdit can be
3985   customized to vastly unnecessary proportions, from initial window positions
3986   down to the font and shadow colors of each individual button (A complete
3987   discussion of how to do this is left to books on the X Window System).  Key
3988   binding (see "Key_Binding_" is one of the most useful of these resource
3989   settable options.
3991   X resources are usually specified in a file called .Xdefaults or .Xresources
3992   in your home directory (on VMS this is sys$login:decw$xdefaults.dat).  On
3993   some systems, this file is read and its information attached to the X server
3994   (your screen) when you start X.  On other systems, the .Xdefaults file is
3995   read each time you run an X program.  When X resource values are attached to
3996   the X server, changes to the resource file are not available to application
3997   programs until you either run the xrdb program with the appropriate file as
3998   input, or re-start the X server.
4000 3>Selected X Resource Names
4002   The following are selected NEdit resource names and default values for NEdit
4003   options not settable via the Preferences menu (for preference resource names,
4004   see your NEdit preference file):
4006 **nedit.tagFile**: (not defined) 
4008   This can be the name of a file, or multiple files separated by a colon (:)
4009   character, of the type produced by Exuberant Ctags or the Unix ctags
4010   command, which NEdit will load at startup time (see ctag_support_ ). The tag
4011   file provides a database from which NEdit can automatically open files
4012   containing the definition of a particular subroutine or data type.
4014 **nedit.alwaysCheckRelativeTagsSpecs: True**
4016   When this resource is set to True, and there are tag files specified (with
4017   the nedit.tagFile resource, see above) as relative paths, NEdit will evaluate
4018   these tag value paths whenever a file is opened. All accessible tag files
4019   will be loaded at this time. When this resource value is False, relative path
4020   tag specifications will only be evaluated at NEdit startup time.
4022 **nedit.shell**: /bin/csh 
4023   
4024   (Unix systems only) The Unix shell (command interpreter) to use for executing
4025   commands from the Shell menu
4027 **nedit.wordDelimiters**: .,/\\`'!@@#%^&*()-=+{}[]":;<>?
4029   The characters, in addition to blanks and tabs, which mark the boundaries
4030   between words for the move-by-word (Ctrl+Arrow) and select-word (double
4031   click) commands.  Note that this default value may be overridden by the
4032   setting in Preferences -> Default Settings -> Language Modes....
4034 **nedit.remapDeleteKey**: False
4035   
4036   Setting this resource to True forcibly maps the delete key to backspace. This
4037   can be helpful on systems where the bindings have become tangled, and in
4038   environments which mix systems with PC style keyboards and systems with DEC
4039   and Macintosh keyboards.  Theoretically, these bindings should be made using
4040   the standard X/Motif mechanisms, outside of NEdit.  In practice, some
4041   environments where users access several different systems remotely, can be
4042   very hard to configure. If you've given up and are using a backspace key
4043   halfway off the keyboard because you can't figure out the bindings, set this
4044   to True.
4045   
4046 **nedit.typingHidesPointer**: False
4047   
4048   Setting this resource to True causes the mouse pointer to be hidden when you
4049   type in the text area. As soon as the mouse pointer is moved, it will 
4050   reappear.  This is useful to stop the mouse pointer from obscuring text.
4051   
4052 **nedit.overrideDefaultVirtualKeyBindings**: Auto
4054   Motif uses a virtual key binding mechanism that shares the bindings between
4055   different Motif applications. When a first Motif application is started, it
4056   installs some default virtual key bindings and any other Motif application 
4057   that runs afterwards, simply reuses them. Obviously, if the first
4058   application installs an invalid set, all others applications may have 
4059   problems.
4060   
4061   In the past, NEdit has been the victim of invalid bindings installed by other 
4062   applications several times. Through this resource, NEdit can be instructed
4063   to ignore the bindings installed by other applications, and use its own
4064   private bindings. By default, NEdit tries to detect invalid bindings
4065   and ignore them automatically (Auto). Optionally, NEdit can be told to
4066   always keep the installed bindings (Never), or to always override them
4067   (Always).
4069 **nedit.stdOpenDialog**: False
4070   
4071   Setting this resource to True restores the standard Motif style of Open
4072   dialog.  NEdit file open dialogs are missing a text field at the bottom of
4073   the dialog, where the file name can be entered as a string.  The field is
4074   removed in NEdit to encourage users to type file names in the list, a
4075   non-standard, but much faster method for finding files.
4077 **nedit.bgMenuButton**: @~Shift@~Ctrl@~Meta@~Alt<Btn3Down>
4078   
4079   Specification for mouse button / key combination to post the background menu
4080   (in the form of an X translation table event specification).  The event
4081   specification should be as specific as possible, since it will override less
4082   specific translation table entries.
4084 **nedit.maxPrevOpenFiles**: 30
4085   
4086   Number of files listed in the Open Previous sub-menu of the File menu.
4087   Setting this to zero disables the Open Previous menu item and maintenance of
4088   the NEdit file history file.
4090 **nedit.printCommand**: (system specific)
4091   
4092   Command used by the print dialog to print a file, such as, lp, lpr, etc..
4093   The command must be capable of accepting input via stdin (standard input).
4095 **nedit.printCopiesOption**: (system specific)
4096   
4097   Option name used to specify multiple copies to the print command.  If the
4098   option should be separated from its argument by a space, leave a trailing
4099   space. If blank, no "Number of Copies" item will appear in the print dialog.
4101 **nedit.printQueueOption**: (system specific)
4102   
4103   Option name used to specify a print queue to the print command.  If the
4104   option should be separated from its argument by a space, leave a trailing
4105   space. If blank, no "Queue" item will appear in the print dialog.
4107 **nedit.printNameOption**: (system specific)
4108   
4109   Option name used to specify a job name to the print command.  If the option
4110   should be separated from its argument by a space, leave a trailing space. If
4111   blank, no job or file name will be attached to the print job or banner page.
4113 **nedit.printHostOption**: (system specific)
4114   
4115   Option name used to specify a host name to the print command.  If the option
4116   should be separated from its argument by a space, leave a trailing space. If
4117   blank, no "Host" item will appear in the print dialog.
4119 **nedit.printDefaultQueue**: (system specific)
4120   
4121   The name of the default print queue.  Used only to display in the print
4122   dialog, and has no effect on printing.
4124 **nedit.printDefaultHost**: (system specific)
4125   
4126   The node name of the default print host.  Used only to display in the print
4127   dialog, and has no effect on printing.
4129 **nedit.visualID**: Best
4131   If your screen supports multiple visuals (color mapping models), this
4132   resource allows you to manually choose among them.  The default value of
4133   "Best" chooses the deepest (most colors) visual available. Since NEdit does
4134   not depend on the specific characteristics of any given color model, Best
4135   probably IS the best choice for everyone, and the only reason for setting
4136   this resource would be to patch around some kind of X server problem. The
4137   resource may also be set to "Default", which chooses the screen's default
4138   visual (often a color-mapped, PseudoColor, visual for compatibility with
4139   older X applications).  It may also be set to a numeric visual-id value (use
4140   xdpyinfo to see the list of visuals supported by your display), or a visual
4141   class name: PseudoColor, DirectColor, TrueColor, etc..
4143   If you are running under a themed environment (like KDE or CDE) that places
4144   its colors in a shallow visual, and you'd rather have that color scheme
4145   instead of more colors available, then you may need set the visual to
4146   "Default" so that NEdit doesn't choose one with more colors.  (The reason
4147   for this is: if the "best" visual is not the server's default, then NEdit
4148   cannot use the colors provided by your environment.  NEdit will fall back to
4149   its own default color scheme.)
4151 **nedit.installColormap**: False
4153   Force the installation of a private colormap.  If you have a humble 8-bit
4154   color display, and netscape is hogging all of the color cells, you may want
4155   to try turning this on.  On most systems, this will result in colors flashing
4156   wildly when you switch between NEdit and other applications.  But a few
4157   systems (SGI) have hardware support for multiple simultaneous colormaps, and
4158   applications with installed colormaps are well behaved.
4160 **nedit.findReplaceUsesSelection**: False
4162   Controls if the Find and Replace dialogs are automatically loaded with the
4163   contents of the primary selection.
4165 **nedit.stickyCaseSenseButton**: True
4167   Controls if the "Case Sensitive" buttons in the Find and Replace dialogs and
4168   the incremental search bar maintain a separate state for literal and regular
4169   expression searches. Moreover, when set to True, by default literal searches
4170   are case insensitive and regular expression searches are case sensitive. When
4171   set to False, the "Case Sensitive" buttons are independent of the "Regular
4172   Expression" toggle.
4174 **nedit.multiClickTime**: (system specific)
4175   
4176   Maximum time in milliseconds allowed between mouse clicks within double and
4177   triple click actions.
4179 **nedit.undoModifiesSelection**: True
4181   By default, NEdit selects any text inserted or changed through a undo/redo
4182   action.  Set this resource to False if you don't want your selection to be
4183   touched.
4185 **nedit@*scrollBarPlacement**: BOTTOM_RIGHT
4186   
4187   How scroll bars are placed in NEdit windows, as well as various lists and
4188   text fields in the program. Other choices are: BOTTOM_LEFT, TOP_LEFT, or
4189   TOP_RIGHT.
4191 **nedit@*text.autoWrapPastedText**: False
4192   
4193   When Auto Newline Wrap is turned on, apply automatic wrapping (which
4194   normally only applies to typed text) to pasted text as well.
4196 **nedit@*text.heavyCursor**: False
4197   
4198   For monitors with poor resolution or users who have difficulty seeing the
4199   cursor, makes the cursor in the text editing area of the window heavier and
4200   darker.
4202 **nedit.autoScrollVPadding**: 4
4203   
4204   Number of lines to keep the cursor away from the top or bottom line of the 
4205   window when the "Auto-Scroll Near Window Top/Bottom" feature is enabled.
4206   Keyboard operations that would cause the cursor to get closer than
4207   this distance cause the window to scroll up or down instead, except at the 
4208   beginning of the file.  Mouse operations are not affected.
4210 **nedit@*text.blinkRate**: 500
4211   
4212   Blink rate of the text insertion cursor in milliseconds.  Set to zero to stop
4213   blinking.
4215 **nedit@*text.Translations**:
4217   Modifies key bindings (see "Key_Binding_").
4219 **nedit@*foreground**: black
4220   
4221   Default foreground color for menus, dialogs, scroll bars, etc..
4223 **nedit@*background**: #b3b3b3
4224   
4225   Default background color for menus, dialogs, scroll bars, etc..
4227 **nedit@*calltipForeground**: black
4229   Foreground color for calltips
4231 **nedit@*calltipBackground**: LemonChiffon1
4233   Background color for calltips
4235 **nedit@*XmLFolder.inactiveForeground**: #666
4236   
4237   Foreground color for inactive tabs.
4239 **nedit@*fontList**: helvetica medium 12 points
4240   
4241   Default font for menus, dialogs, scroll bars, etc..
4243 **nedit.helpFont**: helvetica medium 12 points
4245   Font used for displaying online help.
4246   
4247 **nedit.boldHelpFont**: helvetica bold 12 points
4249   Bold font for online help.
4250   
4251 **nedit.italicHelpFont**: helvetica italic 12 points
4253   Italic font for online help.
4254   
4255 **nedit.fixedHelpFont**: courier medium 12 points
4257   Fixed font for online help.
4258   
4259 **nedit.boldFixedHelpFont**: courier bold 12 points
4261   Fixed bold for online help.
4262   
4263 **nedit.italicFixedHelpFont**: courier italic 12 points
4265   Fixed italic font for online help.
4266   
4267 **nedit.h1HelpFont**: helvetica bold 14 points
4269   Font for level-1 titles in help text.
4270   
4271 **nedit.h2HelpFont**: helvetica bold italic 12 points
4273   Font for level-2 titles in help text.
4274   
4275 **nedit.h3HelpFont**: courier bold 12 points
4277   Font for level-3 titles in help text.
4279 **nedit.helpLinkFont**: helvetica medium 12 points
4281   Font for hyperlinks in the help text
4283 **nedit.helpLinkColor**: #009900
4285   Color for hyperlinks in the help text
4286   
4287 **nedit.backlightCharTypes**:  0-8,10-31,127:red;9:#dedede;32,160-255:#f0f0f0;128-159:orange
4289   **NOTE: backlighting is ~experimental~** (see "Programming_with_NEdit_").
4291   A string specifying character classes as ranges of ASCII values followed by
4292   the color to be used as their background colors.  The format is:
4294   low[-high]{,low[-high]}:color{;low-high{,low[-high]}:color}
4296   where low and high are ASCII values.
4298   For example:
4299     32-255:#f0f0f0;1-31,127:red;128-159:orange;9-13:#e5e5e5
4301 .. DISABLED for 5.4
4302 ..  The macro built-in function set_backlight_string() allows these strings to be
4303 ..  set for a particular window.
4305 **nc.autoStart**: True 
4307   Whether the nc program should automatically start an NEdit server (without
4308   prompting the user) if an appropriate server is not found.
4310 **nc.serverCommand**: nedit -server
4312   Command used by the nc program to start an NEdit server.
4314 **nc.timeOut**: 10
4316   Basic time-out period used in communication with an NEdit server (seconds).
4318    ----------------------------------------------------------------------
4319   ~The following are Selected widget names (to which you may append~
4320   ~.background, .foreground, .fontList, etc., to change colors, fonts~
4321   ~ and other characteristics):~
4323 **nedit@*statsAreaForm**
4325   Statistics line and incremental search bar.  To get consistent results across
4326   the entire stats line and the incremental search bar, use '*' rather than '.'
4327   to separate the resource name.  For example, to set the foreground color of
4328   both components use:  
4329     nedit*statsAreaForm*foreground
4330   instead of:
4331     nedit*statsAreaForm.foreground
4333 **nedit@*menuBar**
4335   Top-of-window menu-bar.
4337 **nedit@*textHorScrollBar**
4339   Horizontal scroll bar.
4341 **nedit@*textVertScrollBar**
4343   Vertical scroll bar.
4344    ----------------------------------------------------------------------
4346 Key Binding
4347 -----------
4349   There are several ways to change key bindings in NEdit.  The easiest way to
4350   add a new key binding in NEdit is to define a macro in Preferences -> Default
4351   Settings -> Customize Menus -> Macro Menu.  However, if you want to change
4352   existing bindings or add a significant number of new key bindings you will
4353   need to do so via X resources.
4355   Before reading this section, you must understand how to set X resources (see
4356   the help section "X_Resources_").  Since setting X resources is tricky, it is
4357   also helpful when working on key-binding, to set some easier-to-verify
4358   resource at the same time, as a simple check that the NEdit program is
4359   actually seeing your changes.  The appres program is also very helpful in
4360   checking that the resource settings that you make, actually reach the program
4361   for which they are intended in the correct form.
4363 3>Key Binding in General
4365   Keyboard commands are associated with editor action routines through two
4366   separate mechanisms in NEdit.  Commands which appear in pull-down menus have
4367   individual resources designating a keyboard equivalent to the menu command,
4368   called an accelerator key.  Commands which do not have an associated menu
4369   item are bound to keys via the X toolkit translation mechanism.  The methods
4370   for changing these two kinds of bindings are quite different.
4372 3>Key Binding Via Translations
4374   The most general way to bind actions to keys in NEdit is to use the
4375   translation table associated with the text widget.  To add a binding to Alt+Y
4376   to insert the string "Hi!", for example, add lines similar to the following
4377   to your X resource file:
4379     NEdit*text.Translations: #override \n\
4380       Alt<Key>y: insert_string("Hi!") \n
4382   The Help topic "Action_Routines_" lists the actions available to be bound.
4384   Translation tables map key and mouse presses, window operations, and other
4385   kinds of events, to actions. The syntax for translation tables is
4386   simplified here, so you may need to refer to a book on the X window system
4387   for more detailed information.
4389   Note that accelerator resources (discussed below) override translations, and
4390   that most Ctrl+letter and Alt+letter combinations are already bound to an
4391   accelerator key.  To use one of these combinations from a translation table,
4392   therefore, you must first un-bind the original menu accelerator.
4394   A resource for changing a translation table consists of a keyword; #override,
4395   #augment, or #replace; followed by lines (separated by newline characters)
4396   pairing events with actions.  Events begin with modifiers, like Ctrl, Shift,
4397   or Alt, followed by the event type in <>.  BtnDown, Btn1Down, Btn2Down,
4398   Btn1Up, Key, KeyUp are valid event types.  For key presses, the event type is
4399   followed by the name of the key.  You can specify a combination of events,
4400   such as a sequence of key presses, by separating them with commas.  The other
4401   half of the event/action pair is a set of actions.  These are separated from
4402   the event specification by a colon and from each other by spaces.  Actions
4403   are names followed by parentheses, optionally containing one or more
4404   parameters separated by comas.
4406 3>Changing Menu Accelerator Keys
4408   The menu shortcut keys shown at the right of NEdit menu items can also be
4409   changed via X resources.  Each menu item has two resources associated with
4410   it, accelerator, the event to trigger the menu item; and acceleratorText, the
4411   string shown in the menu.  The form of the accelerator resource is the same
4412   as events for translation table entries discussed above, though multiple keys
4413   and other subtleties are not allowed.  The resource name for a menu is the
4414   title in lower case, followed by "Menu", the resource name of menu item is
4415   the name in lower case, run together, with words separated by caps, and all
4416   punctuation removed.  For example, to change Cut to Ctrl+X, you would add the
4417   following to your .Xdefaults file:
4419       nedit*editMenu.cut.accelerator: Ctrl<Key>x
4420       nedit*editMenu.cut.acceleratorText: Ctrl+X
4422   Accelerator keys with optional shift key modifiers, like Find..., have an
4423   additional accelerator resource with Shift appended to the name.  For
4424   example:
4426       nedit*searchMenu.find.acceleratorText: [Shift]Alt+F
4427       nedit*searchMenu.find.accelerator: Alt<Key>f
4428       nedit*searchMenu.findShift.accelerator: Shift Alt<Key>f
4429    ----------------------------------------------------------------------
4431 Highlighting Patterns
4432 ---------------------
4434 3>Writing Syntax Highlighting Patterns
4436   Patterns are the mechanism by which language syntax highlighting is
4437   implemented in NEdit (see Syntax_Highlighting_ under the heading of Features
4438   for Programming). To create syntax highlighting patterns for a new
4439   language, or to modify existing patterns, select "Recognition Patterns" from
4440   "Syntax Highlighting" sub-section of the "Default Settings" sub-menu of the
4441   "Preferences" menu.
4443   First, a word of caution.  As with regular expression matching in general, it
4444   is quite possible to write patterns which are so inefficient that they
4445   essentially lock up the editor as they recursively re-examine the entire
4446   contents of the file thousands of times.  With the multiplicity of patterns,
4447   the possibility of a lock-up is significantly increased in syntax
4448   highlighting.  When working on highlighting patterns, be sure to save your
4449   work frequently.
4451   NEdit's syntax highlighting is unusual in that it works in real-time (as you
4452   type), and yet is completely programmable using standard regular expression
4453   notation.  Other syntax highlighting editors usually fall either into the
4454   category of fully programmable but unable to keep up in real-time, or
4455   real-time but limited programmability.  The additional burden that NEdit
4456   places on pattern writers in order to achieve this speed/flexibility mix, is
4457   to force them to state self-imposed limitations on the amount of context that
4458   patterns may examine when re-parsing after a change.  While the "Pattern
4459   Context Requirements" heading is near the end of this section, it is not
4460   optional, and must be understood before making any any serious effort at
4461   pattern writing.
4463   In its simplest form, a highlight pattern consists of a regular expression to
4464   match, along with a style representing the font an color for displaying any
4465   text which matches that expression.  To bold the word, "highlight", wherever
4466   it appears the text, the regular expression simply would be the word
4467   "highlight".  The style (selected from the menu under the heading of
4468   "Highlight Style") determines how the text will be drawn.  To bold the text,
4469   either select an existing style, such as "Keyword", which bolds text, or
4470   create a new style and select it under Highlight Style.
4472   The full range of regular expression capabilities can be applied in such a
4473   pattern, with the single caveat that the expression must conclusively match
4474   or not match, within the pre-defined context distance (as discussed below
4475   under Pattern Context Requirements).
4477   To match longer ranges of text, particularly any constructs which exceed the
4478   requested context, you must use a pattern which highlights text between a
4479   starting and ending regular expression match.  To do so, select "Highlight
4480   text between starting and ending REs" under "Matching", and enter both a
4481   starting and ending regular expression.  For example, to highlight everything
4482   between double quotes, you would enter a double quote character in both the
4483   starting and ending regular expression fields.  Patterns with both a
4484   beginning and ending expression span all characters between the two
4485   expressions, including newlines.
4487   Again, the limitation for automatic parsing to operate properly is that both
4488   expressions must match within the context distance stated for the pattern
4489   set.
4491   With the ability to span large distances, comes the responsibility to recover
4492   when things go wrong.  Remember that syntax highlighting is called upon to
4493   parse incorrect or incomplete syntax as often as correct syntax.  To stop a
4494   pattern short of matching its end expression, you can specify an error
4495   expression, which stops the pattern from gobbling up more than it should. 
4496   For example, if the text between double quotes shouldn't contain newlines,
4497   the error expression might be "$".  As with both starting and ending
4498   expressions, error expressions must also match within the requested context
4499   distance.
4501 4>Coloring Sub-Expressions
4503   It is also possible to color areas of text within a regular expression
4504   match.  A pattern of this type associates a style with sub-expressions
4505   references of the parent pattern (as used in regular expression substitution
4506   patterns, see the NEdit Help menu item on Regular_Expressions_). 
4507   Sub-expressions of both the starting and ending patterns may be colored.  For
4508   example, if the parent pattern has a starting expression "\<", and end
4509   expression "\>", (for highlighting all of the text contained within angle
4510   brackets), a sub-pattern using "&" in both the starting and ending expression
4511   fields could color the brackets differently from the intervening text.  A
4512   quick shortcut to typing in pattern names in the Parent Pattern field is to
4513   use the middle mouse button to drag them from the Patterns list.
4514   
4515   In some cases, there can be interference between coloring sub-patterns and
4516   hierarchical sub-patterns (disscussed next). How this is resolved, is
4517   explained below.
4519 4>Hierarchical Patterns
4521   A hierarchical sub-pattern, is identical to a top level pattern, but is
4522   invoked only between the starting and ending expression matches of its
4523   parent pattern or, in case the parent pattern consists of a single
4524   expression, inside the text area matching that expression.  Like the 
4525   sub-expression coloring patterns discussed above, it is associated with a
4526   parent pattern using the Parent Pattern field in the pattern specification.
4527   Pattern names can be dragged from the pattern list with the middle mouse
4528   button to the Parent Pattern field.
4529   
4530   The matching behaviour for sub-patterns is slightly different, depending on
4531   whether the parent pattern consists of a single expression or has both a
4532   starting and an ending expression.
4533   
4534   In case the parent pattern consists of a single expression, and the syntax
4535   highlighting parser finds a match for that expression, sub-patterns are
4536   matched between the start and the end of the parent match.  Sub-patterns
4537   cannot extend beyond the boundaries of the parent's match nor can they
4538   affect those boundaries (the latter can happen for starting/ending parent
4539   patterns, see below). Note that sub-patterns can ~peek~ beyond the
4540   parent's matching boundaries by means of look-ahead or look-behind
4541   expressions.
4542   
4543   In case the parent pattern is a starting/ending style pattern, after the
4544   start expression of the parent pattern matches, the syntax highlighting
4545   parser searches for either the parent's end pattern or a matching
4546   sub-pattern.  When a sub-pattern matches, control is not returned to the
4547   parent pattern until the entire sub-pattern has been parsed, regardless of
4548   whether the parent's end pattern appears in the text matched by the
4549   sub-pattern.  In this way, matching of the parent's ending pattern can be
4550   postponed, in contrast to the case where the parent pattern consists of a
4551   single expression. Note that, in this case, parsing of sub-patterns starts
4552   **after** the match of the parent pattern's starting expression, also in
4553   contrast to the single-expression case.
4555   The most common use for this capability is for coloring sub-structure of
4556   language constructs (smaller patterns embedded in larger patterns). 
4557   Hierarchical patterns can also simplify parsing by having sub-patterns "hide"
4558   special syntax from parent patterns, such as special escape sequences or
4559   internal comments.
4561   There is no depth limit in nesting hierarchical sub-patterns, but beyond the
4562   third level of nesting, automatic re-parsing will sometimes have to re-parse
4563   more than the requested context distance to guarantee a correct parse (which
4564   can slow down the maximum rate at which the user can type if large sections
4565   of text are matched only by deeply nested patterns).
4567   While this is obviously not a complete hierarchical language parser it is
4568   still useful in many text coloring situations.  As a pattern writer, your
4569   goal is not to completely cover the language syntax, but to generate
4570   colorings that are useful to the programmer.  Simpler patterns are usually
4571   more efficient and also more robust when applied to incorrect code.
4572   
4573   Note that in case of a single-expression parent pattern, there is a
4574   potential for conflicts between coloring-only sub-patterns and hierarchical
4575   sub-patterns (which cannot happen for starting/ending type of patterns,
4576   because sub-patterns are matched **between** the starting and ending pattern
4577   (not included)).  Due to the different nature of these two kinds of
4578   sub-patterns, it is technically infeasible to follow the standard matching
4579   precedence rules, where a sub-pattern has precedence over the sub-patterns
4580   following it.  Instead, coloring-only sub-patterns are always colored last,
4581   ie., they may override the coloring for overlapping sibling sub-patterns in
4582   the overlapping parts of the matches.
4584 4>Deferred (Pass-2) Parsing
4586   NEdit does pattern matching for syntax highlighting in two passes.  The first
4587   pass is applied to the entire file when syntax highlighting is first turned
4588   on, and to new ranges of text when they are initially read or pasted in.  The
4589   second pass is applied only as needed when text is exposed (scrolled in to
4590   view).
4592   If you have a particularly complex set of patterns, and parsing is beginning
4593   to add a noticeable delay to opening files or operations which change large
4594   regions of text, you can defer some of that parsing from startup time, to
4595   when it is actually needed for viewing the text.  Deferred parsing can only
4596   be used with single expression patterns, or begin/end patterns which match
4597   entirely within the requested context distance.  To defer the parsing of a
4598   pattern to when the text is exposed, click on the Pass-2 pattern type button
4599   in the highlight patterns dialog.
4601   Sometimes a pattern can't be deferred, not because of context requirements,
4602   but because it must run concurrently with pass-1 (non-deferred) patterns.  If
4603   they didn't run concurrently, a pass-1 pattern might incorrectly match some
4604   of the characters which would normally be hidden inside of a sequence matched
4605   by the deferred pattern.  For example, C has character constants enclosed in
4606   single quotes.  These typically do not cross line boundaries, meaning they
4607   can be parsed entirely within the context distance of the C pattern set and
4608   should be good candidates for deferred parsing.  However, they can't be
4609   deferred because they can contain sequences of characters which can trigger
4610   pass-one patterns. Specifically, the sequence, '\"', contains a double quote
4611   character, which would be matched by the string pattern and interpreted as
4612   introducing a string.
4614 4>Pattern Context Requirements
4616   The context requirements of a pattern set state how much additional text
4617   around any change must be examined to guarantee that the patterns will match
4618   what they are intended to match.  Context requirements are a promise by NEdit
4619   to the pattern writer, that the regular expressions in his/her patterns will
4620   be matched against at least <line context> lines and <character context>
4621   characters, around any modified text.  Combining line and character
4622   requirements guarantee that both will be met.
4624   Automatic re-parsing happens on EVERY KEYSTROKE, so the amount of context
4625   which must be examined is very critical to typing efficiency.  The more
4626   complicated your patterns, the more critical the context becomes.  To cover
4627   all of the keywords in a typical language, without affecting the maximum rate
4628   at which users can enter text, you may be limited to just a few lines and/or
4629   a few hundred characters of context.
4631   The default context distance is 1 line, with no minimum character
4632   requirement.  There are several benefits to sticking with this default.  One
4633   is simply that it is easy to understand and to comply with.  Regular
4634   expression notation is designed around single line matching.  To span lines
4635   in a regular expression, you must explicitly mention the newline character
4636   "\n", and matches which are restricted to a single line are virtually immune
4637   to lock-ups.  Also, if you can code your patterns to work within a single
4638   line of context, without an additional character-range context requirement,
4639   the parser can take advantage the fact that patterns don't cross line
4640   boundaries, and nearly double its efficiency over a one-line and 1-character
4641   context requirement.  (In a single line context, you are allowed to match
4642   newlines, but only as the first and/or last character.)
4643    ----------------------------------------------------------------------
4645 Smart Indent Macros
4646 -------------------
4648   Smart indent macros can be written for any language, but are usually more
4649   difficult to write than highlighting patterns.  A good place to start, of
4650   course, is to look at the existing macros for C and C++.
4652   Smart indent macros for a language mode consist of standard NEdit macro
4653   language code attached to any or all of the following three activation
4654   conditions: 1) When smart indent is first turned on for a text window
4655   containing code of the language, 2) When a newline is typed and smart indent
4656   is expected, 3) after any character is typed.  To attach macro code to any of
4657   these code "hooks", enter it in the appropriate section in the Preferences ->
4658   Default Settings -> Auto Indent -> Program Smart Indent dialog.
4660   Typically most of the code should go in the initialization section, because
4661   that is the appropriate place for subroutine definitions, and smart indent
4662   macros are complicated enough that you are not likely to want to write them
4663   as one monolithic run of code.  You may also put code in the Common/Shared
4664   Initialization section (accessible through the button in the upper left
4665   corner of the dialog).  Unfortunately, since the C/C++ macros also reside in
4666   the common/shared section, when you add code there, you run some risk of
4667   missing out on future upgrades to these macros, because your changes will
4668   override the built-in defaults.
4670   The newline macro is invoked after the user types a newline, but before the
4671   newline is entered in the buffer.  It takes a single argument ($1) which is
4672   the position at which the newline will be inserted.  It must return the
4673   number of characters of indentation the line should have, or -1.  A return
4674   value of -1 means to do a standard auto-indent.  You must supply a newline
4675   macro, but the code: "return -1" (auto-indent), or "return 0" (no indent) is
4676   sufficient.
4678   The type-in macro takes two arguments.  $1 is the insert position, and $2 is
4679   the character just inserted, and does not return a value.  You can do just
4680   about anything here, but keep in mind that this macro is executed for every
4681   keystroke typed, so if you try to get too fancy, you may degrade performance.
4682    ----------------------------------------------------------------------
4684 NEdit Command Line
4685 ------------------
4687 .. ? help !!#ifndef VMS
4688    **nedit** [-**read**] [-**create**] [-**line** n | +n] [-**server**]
4689       [-**do** command] [-**tags** file] [-**tabs** n] [-**wrap**]
4690       [-**nowrap**] [-**autowrap**] [-**autoindent**] [-**noautoindent**]
4691       [-**autosave**] [-**noautosave**] [-**rows** n] [-**columns** n]
4692       [-**font** font] [-**lm** languagemode] [-**geometry** geometry]
4693       [-**iconic**] [-**noiconic**] [-**display** [host]:server[.screen]
4694       [-**xrm** resourcestring] [-**svrname** name] [-**import** file]
4695       [-**background** color] [-**foreground** color]
4696       [-**tabbed**] [-**untabbed**] [-**group**] [-**V**|-**version**]
4697       [--] [file...]
4699 **-read**
4700   Open the file Read Only regardless of the actual file protection.
4702 **-create**
4703   Don't warn about file creation when a file doesn't exist.
4705 **-line n (or +n)**
4706   Go to line number n
4708 **-server**
4709   Designate this session as an NEdit server, for processing commands from the
4710   nc program.  nc can be used to interface NEdit to code development
4711   environments, mailers, etc., or just as a quick way to open files from the
4712   shell command line without starting a new NEdit session.
4714 **-do command**
4715   Execute an NEdit macro or action on the file following the -do argument on 
4716   the command line. -do is particularly useful from the nc program, where 
4717   nc -do can remotely execute commands in an NEdit -server session.
4719 **-tags file**
4720   Load a file of directions for finding definitions of program subroutines and
4721   data objects.  The file must be of the format generated by Exuberant Ctags,
4722   or the standard Unix ctags command.
4724 **-tabs n**
4725   Set tab stops every n characters.
4727 **-wrap, -nowrap**
4728   Wrap long lines at the right edge of the window rather than continuing them
4729   past it.  (Continuous Wrap mode)
4731 **-autowrap, -noautowrap**
4732   Wrap long lines when the cursor reaches the right edge of the window by
4733   inserting newlines at word boundaries.  (Auto Newline Wrap mode)
4735 **-autoindent, -noautoindent**
4736   Maintain a running indent.
4738 **-autosave, -noautosave**
4739   Maintain a backup copy of the file being edited under the name '~filename'. 
4741 **-rows n**
4742   Default height in characters for an editing window.
4744 **-columns n**
4745   Default width in characters for an editing window.
4747 **-font font (or -fn font)**
4748   Font for text being edited (Font for menus and dialogs can be set with -xrm
4749   "*fontList:font").
4751 **-lm languagemode**
4752   Initial language mode used for editing succeeding files.
4754 **-geometry geometry (or -g geometry)**
4755   The initial size and/or location of editor windows.  The argument geometry
4756   has the form:
4758    [<width>x<height>][+|-][<xoffset>[+|-]<yoffset>]
4760   where <width> and <height> are the desired width and height of the window,
4761   and <xoffset> and <yoffset> are the distance from the edge of the screen to
4762   the window, + for top or left, - for bottom or right.  -geometry can be
4763   specified for individual files on the command line.
4765 **-iconic, -noiconic**
4766   Initial window state for succeeding files.
4768 **-display [host]:server[.screen]**
4769   The name of the X server to use.  host specifies the machine, server
4770   specifies the display server number, and screen specifies the screen number. 
4771   host or screen can be omitted and default to the local machine, and screen 0.
4773 **-background color (or -bg color)**
4774   User interface background color. (Background color for text can be set
4775   separately with -xrm "nedit.textBgColor: color" or using the Preferences ->
4776   Colors dialog).
4778 **-foreground color (or -fg color)**
4779   User interface foreground color. (Foreground color for text can be set
4780   separately with -xrm "nedit.textFgColor: color" or using the Preferences
4781   -> Colors dialog).
4783 **-tabbed**
4784   Open all subsequent files in new tabs. Resets -group option.
4786 **-untabbed**
4787   Open all subsequent files in new windows. Resets -group option.
4789 **-group**
4790   Open all subsequent files as tabs in a new window.
4792 **-xrm resourcestring** 
4793   Set the value of an X resource to override a default
4794   value (see "Customizing_NEdit_").
4796 **-svrname name**
4797   When starting NEdit in server mode, name the server, such that it responds to
4798   requests only when nc is given a corresponding -svrname argument.  By naming
4799   servers, you can run several simultaneously, and direct files and commands
4800   specifically to any one. Specifying a non-empty name automatically designates
4801   this session as an NEdit server, as though -server were specified.
4803 **-import file**
4804   Loads an additional preferences file on top of the existing defaults saved in
4805   your preferences file.  To incorporate macros, language modes, and highlight
4806   patterns and styles written by other users, run NEdit with -import <file>,
4807   then re-save your preference file with Preferences -> Save Defaults.
4809 **-version**
4810   Prints out the NEdit version information. The -V option is synonymous.
4811   
4812 **--**
4813   Treats all subsequent arguments as file names, even if they start with a
4814   dash. This is so NEdit can access files that begin with the dash character.
4816 .. ? help~
4817 !!#else
4819 ..   This documentation for VMS NEdit usage should only appear in the
4820 ..   generated help code, not in any of the printed documentation.
4821 ..   Reasoning is that VMS usage is diminishing and there is a desire
4822 ..   to not clutter up the printed documentation here.
4824   NEDIT [filespec[,...]]
4826   The following qualifiers are accepted:
4828 **/read**
4829   Open the file Read Only regardless of the actual file protection.
4831 **/create**
4832   Don't warn about file creation when a file doesn't exist.
4834 **/line=n**
4835   Go to line #n
4837 **/server** 
4838   Designate this session as an NEdit server for processing commands from the nc
4839   program. The nc program can be used to interface NEdit to code development
4840   environments, mailers, etc., or just as a quick way to open files from the
4841   shell command line without starting a new NEdit session.
4843 **/do=command**
4844   Execute an NEdit action routine. on each file following the /do argument on
4845   the command line.  /do is particularly useful from the nc program, where nc
4846   /do can remotely execute commands in an nedit /server session.
4848 **/tags=file**
4849   Load a file of directions for finding definitions of program subroutines and
4850   data objects.  The file must be of the format generated by the Unix ctags
4851   command.
4853 **/wrap, /nowrap**
4854   Wrap long lines at the right edge of the window rather than continuing them
4855   past it.  (Continuous Wrap mode)
4857 **/autowrap, /noautowrap**
4858   Wrap long lines when the cursor reaches the right edge of the window by
4859   inserting newlines at word boundaries.  (Auto Newline Wrap mode)
4861 **/autoindent, /noautoindent**
4862   Maintain a running indent.
4864 **/autosave, /noautosave**
4865   Maintain a backup copy of the file being edited under the name '_filename'.
4867 **/rows=n**
4868   Default width in characters for an editing window.
4870 **/columns=n**
4871   Default height in characters for an editing window.
4873 **/font=font (or /fn=font)**
4874   Font for text being edited (Font for menus and dialogs can be set with 
4875   /xrm="*fontList:font").
4877 **/display [host]:server[.screen]**
4878   The name of the X server to use.  host specifies the machine, server
4879   specifies the display server number, and screen specifies the screen number. 
4880   host or screen can be omitted and default to the local machine, and screen 0.
4882 **/geometry=geometry (or /g=geometry)**
4883   The initial size and/or location of editor windows. The argument geometry
4884   has the form:
4886     [<width>x<height>][+|-][<xoffset>[+|-]<yoffset>]
4888   where <width> and <height> are the desired width and height of the window,
4889   and <xoffset> and <yoffset> are the distance from the edge of the screen to
4890   the window, + for top or left, - for bottom or right.
4892 **/background=color (or /bg=color)**
4894   Background color. (background color for text can be set separately with 
4895   /xrm="nedit:textBgColor color" or using the Preferences ->
4896   Colors dialog).
4898 **/foreground=color (or /fg=color)**
4899   Foreground color. (foreground color for text can be set separately with
4900   /xrm="nedit:textFgColor color" or using the Preferences ->
4901   Colors dialog).
4903 **/tabbed**
4904   Open all subsequent files in new tabs. Resets /group option.
4906 **/untabbed**
4907   Open all subsequent files in new windows. Resets /group option.
4909 **/group**
4910   Open all subsequent files as tabs in a new window.
4912 **/xrm=resourcestring**
4913   Set the value of an X resource to override a default value 
4914   (see Customizing NEdit).
4916 **/svrname=name**
4917   When starting nedit in server mode, name the server, such that it responds to
4918   requests only when nc is given a corresponding -svrname argument.  By naming
4919   servers, you can run several simultaneously, and direct files and commands
4920   specifically to any one.
4922 **/import=file**
4923   Loads an additional preferences file on top of the existing defaults saved in
4924   your .nedit file.  To incorporate macros, language modes, and highlight
4925   patterns and styles written by other users, run nedit with /import=<file>,
4926   then re-save your .nedit file with Preferences -> Save Defaults.
4928   Unix-style command lines (but not file names) are also acceptable:
4930     nedit -rows 20 -wrap file1.c file2.c
4932   is equivalent to:
4934     nedit /rows=20/wrap file1.c, file2.c",
4935 !!#endif /* VMS */    
4936 .. ~ help
4937    ----------------------------------------------------------------------
4939 Client/Server Mode
4940 ------------------
4942   NEdit can be operated on its own, or as a two-part client/server
4943   application.  Client/server mode is useful for integrating NEdit with
4944   software development environments, mailers, and other programs; or just as a
4945   quick way to open files from the shell command line without starting a new
4946   NEdit session.
4948   To run NEdit in server mode, type:
4950       nedit -server
4952   NEdit can also be started in server mode via the NEdit Client program
4953   (**nc**) when no servers are available.
4955   The nc program, which is distributed along with NEdit, sends commands to
4956   an NEdit server to open files or execute editor actions. It can also be
4957   used on files that are already opened.
4958   
4959   Listing a file on the nc command line means: Open it if it is not already
4960   open and bring the window to the front.
4963   nc supports the following command line options:
4965     **nc** [**-read**] [**-create**]
4966        [**-line** n | **+**n] [**-do** command] [**-lm** languagemode]
4967        [**-svrname** name] [**-svrcmd** command]
4968        [**-ask**] [**-noask**] [**-timeout** seconds]
4969        [**-geometry** geometry | **-g** geometry] [**-icon** | **-iconic**]
4970        [-**tabbed**] [-**untabbed**] [-**group**] [**-wait**]
4971        [**-V** | **-version**]
4972        [**-xrm** resourcestring] [**-display** [host]:server[.screen]]
4973        [**-**-] [file...]
4974   
4975 **-read**
4976   Open the file read-only regardless of its actual permissions. There is no
4977   effect if the file is already open.
4979 **-create**
4980   Don't warn about file creation when a file doesn't exist.
4982 **-line** n, **+**n
4983   Go to line number n. This will also affect files which are already open.
4985 **-do** command
4986   Execute an NEdit macro or action on the file following the -do argument
4987   on the command line.
4988   
4989   If you use this command without a filename, nc would randomly choose one
4990   window to focus and execute the macro in.
4992 **-ask**, **-noask**
4993   Instructs nc to automatically start a server if one is not available.  This
4994   overrides the X resource `nc.autoStart' (see X_Resources_).
4996 **-svrname** name
4997   Explicitly instructs nc which server to connect to, an instance of
4998   nedit(1) with a corresponding -svrname argument.  By naming servers, you
4999   can run several simultaneously, and direct files and commands
5000   specifically to any one. 
5002 **-svrcmd** command
5003   The command which nc uses to start an NEdit server. It is also settable
5004   via the X resource `nc.serverCommand' (see X_Resources_). Defaults to
5005   "nedit -server".
5007 **-lm** languagemode
5008   Initial language mode used.
5010 **-geometry** geometry, **-g** geometry
5011   The initial size and/or location of editor windows. See
5012   NEdit_Command_Line_ for details.
5014 **-icon**, **-iconic**
5015   Initial window state.
5017 **-display** [<host>]:<server>[.<screen>]
5018   The name of the X server to use. See NEdit_Command_Line_ for details.
5020 **-timeout** seconds
5021   Basic time-out period used in communication with an NEdit server.  The
5022   default is 10 seconds. Also settable via the X resource `nc.timeOut'.
5024   Under rare conditions (such as a slow connection), it may be necessary to
5025   increase the time-out period. In most cases, the default is fine.
5027 **-tabbed**
5028   Open all subsequent files in new tabs. Resets -group option.
5030 **-untabbed**
5031   Open all subsequent files in new windows. Resets -group option.
5033 **-group**
5034   Open all subsequent files as tabs in a new window.
5036 **-wait**
5037   Instructs nc not to return to the shell until all files given are closed.
5038   
5039   Normally, nc returns once the files given in its command line are opened
5040   by the server. When this option is given, nc returns only after the last
5041   file given in this call is closed.
5042   
5043   Note that this option affects all files in the command line, not only the
5044   ones following this option.
5045   
5046   Note that nc will wait for all files given in the command line, even if
5047   the files were already opened.
5050 4>Command Line Arguments
5052   In typical Unix style, arguments affect the files which follow them on the
5053   command line, for example:
5055       incorrect:   nc file.c -line 25
5056       correct:     nc -line 25 file.c
5058   -read, -create, and -line affect all of the files which follow them on the
5059   command line.
5060   
5061   The -do macro is executed only once, on the next file on the line.  -do
5062   without a file following it on the command line, executes the macro on the
5063   first available window (presumably when you give a -do command without a
5064   corresponding file or window, you intend it to do something independent of
5065   the window in which it happens to execute).
5066   
5067   The -wait option affects all files named in the command line.
5069 4>Multiple Servers
5071   Sometimes it is useful to have more than one NEdit server running, for
5072   example to keep mail and programming work separate.  The option, -svrname, to
5073   both nedit and nc, allows you to start, and communicate with, separate named
5074   servers.  A named server responds only to requests with the corresponding
5075   -svrname argument.  If you use ClearCase and are within a ClearCase view, the
5076   server name will default to the name of the view (based on the value of the
5077   CLEARCASE_ROOT environment variable).
5079 4>Communication
5081   Communication between nc and nedit is done through the X display. So as long
5082   as the X Window System is set up and working properly, nc will work properly
5083   as well. nc uses the DISPLAY environment variable, the machine name and your
5084   user name to find the appropriate server, meaning, if you have several
5085   machines sharing a common file system, nc will not be able to find a server
5086   that is running on a machine with a different host name, even though it may
5087   be perfectly appropriate for editing a given file.
5089   The command which nc uses to start an nedit server is settable via the X
5090   resource nc.serverCommand, by default, "nedit -server".
5091    ----------------------------------------------------------------------
5093 Crash Recovery
5094 --------------
5096   If a system crash, network failure, X server crash, or program error should
5097   happen while you are editing a file, you can still recover most of your
5098   work.  NEdit maintains a backup file which it updates periodically (every 8
5099   editing operations or 80 characters typed).  This file has the same name
5100   as the file that you are editing, but with the character `~' (tilde) on Unix
5101   or `_' (underscore) on VMS prefixed to the name.  To recover a file after a
5102   crash, simply rename the file to remove the tilde or underscore character,
5103   replacing the older version of the file.  (Because several of the Unix shells
5104   consider the tilde to be a special character, you may have to prefix the
5105   character with a `\' (backslash) when you move or delete an NEdit backup
5106   file.)
5108   Example, to recover the file called "help.c" on Unix type the command:
5110       mv \~help.c help.c
5112   A minor caveat, is that if the file you were editing was in MS DOS format,
5113   the backup file will be in Unix format, and you will need to open the backup
5114   file in NEdit and change the file format back to MS DOS via the Save As...
5115   dialog (or use the Unix unix2dos command outside of NEdit).
5116    ----------------------------------------------------------------------
5118 Version
5119 -------
5120 .. ! help~
5122 |>version<|
5123 |>date<|
5125 .. ~ help
5127 .. There is build time versioning information that is handled specially
5128 .. inside help.c for this section. It needs to have a '%s' string
5129 .. made available for it to appear in the on-line help.
5131 .. ? help %s
5133 .. ======================================================================
5134 .. The policy for credit so far is this:
5136 .. You get "written by" credit if you have contributed significant
5137 .. code or effort to the project.
5139 .. You get a syntax/indent credit if your pattern is compiled into the
5140 .. binary.
5141 .. ======================================================================
5143   NEdit was written by Mark Edel, Joy Kyriakopulos, Christopher Conrad,
5144   Jim Clark, Arnulfo Zepeda-Navratil, Suresh Ravoor, Tony Balinski, Max
5145   Vohlken, Yunliang Yu, Donna Reid, Arne Førlie, Eddy De Greef, Steve
5146   LoBasso, Alexander Mai, Scott Tringali, Thorsten Haude, Steve Haehn,
5147   Andrew Hood, Nathaniel Gray, and TK Soh.
5149   The regular expression matching routines used in NEdit are adapted (with
5150   permission) from original code written by Henry Spencer at the
5151   University of Toronto.
5153   The Microline widgets are inherited from the Mozilla project.
5155   Syntax highlighting patterns and smart indent macros were contributed by:
5156   Simon T. MacDonald,  Maurice Leysens, Matt Majka, Alfred Smeenk,
5157   Alain Fargues, Christopher Conrad, Scott Markinson, Konrad Bernloehr,
5158   Ivan Herman, Patrice Venant, Christian Denat, Philippe Couton,
5159   Max Vohlken, Markus Schwarzenberg, Himanshu Gohel, Steven C. Kapp,
5160   Michael Turomsha, John Fieber, Chris Ross, Nathaniel Gray, Joachim Lous,
5161   Mike Duigou, Seak Teng-Fong, Joor Loohuis, Mark Jones,
5162   and Niek van den Berg.
5164   NEdit sources, executables, additional documentation, and contributed
5165   software are available from the NEdit web site at http://www.nedit.org_.
5167   This program is free software; you can redistribute it and/or
5168   modify it under the terms of the GNU_General_Public_License_
5169   as published by the Free Software Foundation; either version 2
5170   of the License, or (at your option) any later version.
5172   In addition, as a special exception to the GNU GPL, the copyright holders
5173   give permission to link the code of this program with the Motif and Open
5174   Motif libraries (or with modified versions of these that use the same
5175   license), and distribute linked combinations including the two. You must
5176   obey the GNU General Public License in all respects for all of the code
5177   used other than linking with Motif/Open Motif. If you modify this file,
5178   you may extend this exception to your version of the file, but you are
5179   not obligated to do so. If you do not wish to do so, delete this
5180   exception statement from your version.
5182   This program is distributed in the hope that it will be useful,
5183   but WITHOUT ANY WARRANTY; without even the implied warranty of
5184   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5185   section on the GNU_General_Public_License_ for more details.
5186    ----------------------------------------------------------------------
5188 GNU General Public License
5189 -------------------
5191   GNU GENERAL PUBLIC LICENSE
5193   Version 2, June 1991
5195   Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave,
5196   Cambridge, MA 02139, USA. Everyone is permitted to copy and distribute
5197   verbatim copies of this license document, but changing it is not allowed.
5199   Preamble
5201   The licenses for most software are designed to take away your freedom to
5202   share and change it. By contrast, the GNU General Public License is intended
5203   to guarantee your freedom to share and change free software--to make sure the
5204   software is free for all its users. This General Public License applies to
5205   most of the Free Software Foundation's software and to any other program
5206   whose authors commit to using it. (Some other Free Software Foundation
5207   software is covered by the GNU Library General Public License instead.) You
5208   can apply it to your programs, too.
5210   When we speak of free software, we are referring to freedom, not price. Our
5211   General Public Licenses are designed to make sure that you have the freedom
5212   to distribute copies of free software (and charge for this service if you
5213   wish), that you receive source code or can get it if you want it, that you
5214   can change the software or use pieces of it in new free programs; and that
5215   you know you can do these things.
5217   To protect your rights, we need to make restrictions that forbid anyone to
5218   deny you these rights or to ask you to surrender the rights. These
5219   restrictions translate to certain responsibilities for you if you distribute
5220   copies of the software, or if you modify it.
5222   For example, if you distribute copies of such a program, whether gratis or
5223   for a fee, you must give the recipients all the rights that you have. You
5224   must make sure that they, too, receive or can get the source code. And you
5225   must show them these terms so they know their rights.
5227   We protect your rights with two steps: (1) copyright the software, and (2)
5228   offer you this license which gives you legal permission to copy, distribute
5229   and/or modify the software.
5231   Also, for each author's protection and ours, we want to make certain that
5232   everyone understands that there is no warranty for this free software. If the
5233   software is modified by someone else and passed on, we want its recipients to
5234   know that what they have is not the original, so that any problems introduced
5235   by others will not reflect on the original authors' reputations.
5237   Finally, any free program is threatened constantly by software patents. We
5238   wish to avoid the danger that redistributors of a free program will
5239   individually obtain patent licenses, in effect making the program
5240   proprietary. To prevent this, we have made it clear that any patent must be
5241   licensed for everyone's free use or not licensed at all.
5243   The precise terms and conditions for copying, distribution and modification
5244   follow.
5246   GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND
5247   MODIFICATION
5249   0. This License applies to any program or other work which contains a notice
5250   placed by the copyright holder saying it may be distributed under the terms
5251   of this General Public License. The "Program", below, refers to any such
5252   program or work, and a "work based on the Program" means either the Program
5253   or any derivative work under copyright law: that is to say, a work containing
5254   the Program or a portion of it, either verbatim or with modifications and/or
5255   translated into another language. (Hereinafter, translation is included
5256   without limitation in the term "modification".) Each licensee is addressed as
5257   "you".
5259   Activities other than copying, distribution and modification are not covered
5260   by this License; they are outside its scope. The act of running the Program
5261   is not restricted, and the output from the Program is covered only if its
5262   contents constitute a work based on the Program (independent of having been
5263   made by running the Program). Whether that is true depends on what the
5264   Program does.
5266   1. You may copy and distribute verbatim copies of the Program's source code
5267   as you receive it, in any medium, provided that you conspicuously and
5268   appropriately publish on each copy an appropriate copyright notice and
5269   disclaimer of warranty; keep intact all the notices that refer to this
5270   License and to the absence of any warranty; and give any other recipients of
5271   the Program a copy of this License along with the Program.
5273   You may charge a fee for the physical act of transferring a copy, and you may
5274   at your option offer warranty protection in exchange for a fee.
5276   2. You may modify your copy or copies of the Program or any portion of it,
5277   thus forming a work based on the Program, and copy and distribute such
5278   modifications or work under the terms of Section 1 above, provided that you
5279   also meet all of these conditions:
5281   a) You must cause the modified files to carry prominent notices stating
5282   that you changed the files and the date of any change.
5284   b) You must cause any work that you distribute or publish, that in whole or
5285   in part contains or is derived from the Program or any part thereof, to be
5286   licensed as a whole at no charge to all third parties under the terms of
5287   this License.
5289   c) If the modified program normally reads commands interactively when run,
5290   you must cause it, when started running for such interactive use in the
5291   most ordinary way, to print or display an announcement including an
5292   appropriate copyright notice and a notice that there is no warranty (or
5293   else, saying that you provide a warranty) and that users may redistribute
5294   the program under these conditions, and telling the user how to view a copy
5295   of this License. (Exception: if the Program itself is interactive but does
5296   not normally print such an announcement, your work based on the Program is
5297   not required to print an announcement.)
5299   These requirements apply to the modified work as a whole. If identifiable
5300   sections of that work are not derived from the Program, and can be reasonably
5301   considered independent and separate works in themselves, then this License,
5302   and its terms, do not apply to those sections when you distribute them as
5303   separate works. But when you distribute the same sections as part of a whole
5304   which is a work based on the Program, the distribution of the whole must be
5305   on the terms of this License, whose permissions for other licensees extend to
5306   the entire whole, and thus to each and every part regardless of who wrote it.
5308   Thus, it is not the intent of this section to claim rights or contest your
5309   rights to work written entirely by you; rather, the intent is to exercise the
5310   right to control the distribution of derivative or collective works based on
5311   the Program.
5313   In addition, mere aggregation of another work not based on the Program with
5314   the Program (or with a work based on the Program) on a volume of a storage or
5315   distribution medium does not bring the other work under the scope of this
5316   License.
5318   3. You may copy and distribute the Program (or a work based on it, under
5319   Section 2) in object code or executable form under the terms of Sections 1
5320   and 2 above provided that you also do one of the following:
5322   a) Accompany it with the complete corresponding machine-readable source
5323   code, which must be distributed under the terms of Sections 1 and 2 above
5324   on a medium customarily used for software interchange; or,
5326   b) Accompany it with a written offer, valid for at least three years, to
5327   give any third party, for a charge no more than your cost of physically
5328   performing source distribution, a complete machine-readable copy of the
5329   corresponding source code, to be distributed under the terms of Sections 1
5330   and 2 above on a medium customarily used for software interchange; or,
5332   c) Accompany it with the information you received as to the offer to
5333   distribute corresponding source code. (This alternative is allowed only for
5334   noncommercial distribution and only if you received the program in object
5335   code or executable form with such an offer, in accord with Subsection b
5336   above.)
5338   The source code for a work means the preferred form of the work for making
5339   modifications to it. For an executable work, complete source code means all
5340   the source code for all modules it contains, plus any associated interface
5341   definition files, plus the scripts used to control compilation and
5342   installation of the executable. However, as a special exception, the source
5343   code distributed need not include anything that is normally distributed (in
5344   either source or binary form) with the major components (compiler, kernel,
5345   and so on) of the operating system on which the executable runs, unless that
5346   component itself accompanies the executable.
5348   If distribution of executable or object code is made by offering access to
5349   copy from a designated place, then offering equivalent access to copy the
5350   source code from the same place counts as distribution of the source code,
5351   even though third parties are not compelled to copy the source along with the
5352   object code.
5354   4. You may not copy, modify, sublicense, or distribute the Program except as
5355   expressly provided under this License. Any attempt otherwise to copy, modify,
5356   sublicense or distribute the Program is void, and will automatically
5357   terminate your rights under this License. However, parties who have received
5358   copies, or rights, from you under this License will not have their licenses
5359   terminated so long as such parties remain in full compliance.
5361   5. You are not required to accept this License, since you have not signed it.
5362   However, nothing else grants you permission to modify or distribute the
5363   Program or its derivative works. These actions are prohibited by law if you
5364   do not accept this License. Therefore, by modifying or distributing the
5365   Program (or any work based on the Program), you indicate your acceptance of
5366   this License to do so, and all its terms and conditions for copying,
5367   distributing or modifying the Program or works based on it.
5369   6. Each time you redistribute the Program (or any work based on the Program),
5370   the recipient automatically receives a license from the original licensor to
5371   copy, distribute or modify the Program subject to these terms and conditions.
5372   You may not impose any further restrictions on the recipients' exercise of
5373   the rights granted herein. You are not responsible for enforcing compliance
5374   by third parties to this License.
5376   7. If, as a consequence of a court judgment or allegation of patent
5377   infringement or for any other reason (not limited to patent issues),
5378   conditions are imposed on you (whether by court order, agreement or
5379   otherwise) that contradict the conditions of this License, they do not excuse
5380   you from the conditions of this License. If you cannot distribute so as to
5381   satisfy simultaneously your obligations under this License and any other
5382   pertinent obligations, then as a consequence you may not distribute the
5383   Program at all. For example, if a patent license would not permit
5384   royalty-free redistribution of the Program by all those who receive copies
5385   directly or indirectly through you, then the only way you could satisfy both
5386   it and this License would be to refrain entirely from distribution of the
5387   Program.
5389   If any portion of this section is held invalid or unenforceable under any
5390   particular circumstance, the balance of the section is intended to apply and
5391   the section as a whole is intended to apply in other circumstances.
5393   It is not the purpose of this section to induce you to infringe any patents
5394   or other property right claims or to contest validity of any such claims;
5395   this section has the sole purpose of protecting the integrity of the free
5396   software distribution system, which is implemented by public license
5397   practices. Many people have made generous contributions to the wide range of
5398   software distributed through that system in reliance on consistent
5399   application of that system; it is up to the author/donor to decide if he or
5400   she is willing to distribute software through any other system and a licensee
5401   cannot impose that choice.
5403   This section is intended to make thoroughly clear what is believed to be a
5404   consequence of the rest of this License.
5406   8. If the distribution and/or use of the Program is restricted in certain
5407   countries either by patents or by copyrighted interfaces, the original
5408   copyright holder who places the Program under this License may add an
5409   explicit geographical distribution limitation excluding those countries, so
5410   that distribution is permitted only in or among countries not thus excluded.
5411   In such case, this License incorporates the limitation as if written in the
5412   body of this License.
5414   9. The Free Software Foundation may publish revised and/or new versions of
5415   the General Public License from time to time. Such new versions will be
5416   similar in spirit to the present version, but may differ in detail to address
5417   new problems or concerns.
5419   Each version is given a distinguishing version number. If the Program
5420   specifies a version number of this License which applies to it and "any later
5421   version", you have the option of following the terms and conditions either of
5422   that version or of any later version published by the Free Software
5423   Foundation. If the Program does not specify a version number of this License,
5424   you may choose any version ever published by the Free Software Foundation.
5426   10. If you wish to incorporate parts of the Program into other free programs
5427   whose distribution conditions are different, write to the author to ask for
5428   permission. For software which is copyrighted by the Free Software
5429   Foundation, write to the Free Software Foundation; we sometimes make
5430   exceptions for this. Our decision will be guided by the two goals of
5431   preserving the free status of all derivatives of our free software and of
5432   promoting the sharing and reuse of software generally.
5434   **NO WARRANTY**
5436   11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
5437   THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
5438   STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
5439   PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
5440   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
5441   FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
5442   PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
5443   YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
5445   12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
5446   WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
5447   REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
5448   INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
5449   OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO
5450   LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
5451   THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
5452   PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
5453   POSSIBILITY OF SUCH DAMAGES.
5455   END OF TERMS AND CONDITIONS
5456    ----------------------------------------------------------------------
5458 Mailing Lists
5459 -------------
5461   There are two separate mailing lists for nedit users, and one for developers.
5462   Users may post to the developer mailing list to report defects and communicate
5463   with the nedit developers.  Remember that nedit is entirely a volunteer
5464   effort, so please ask questions first to the discussion list, and do your
5465   share to answer other users questions as well.
5467     discuss@@nedit.org_
5468     
5469   General discussion, questions and answers among NEdit users and developers.
5471     announce@@nedit.org_
5473   A low-volume mailing list for announcing new versions.
5475     develop@@nedit.org_
5477   Communication among and with NEdit developers.  
5478   Developers should also subscribe to the discuss list.
5480   To subscribe, send mail to one of the following addresses:
5482     announce-request@@nedit.org_
5483     discuss-request@@nedit.org_
5484     develop-request@@nedit.org_
5486   with the body consisting of the single word
5488     subscribe
5489    ----------------------------------------------------------------------
5491 Problems/Defects
5492 ----------------
5494 3>Solutions to Common Problems
5496   For a much more comprehensive list of common problems and solutions, see the
5497   NEdit FAQ.  The latest version of the FAQ can always be found on the NEdit
5498   web site at:
5500       http://www.nedit.org_.
5502   **P: No files are shown in the "Files" list in the Open... dialog.**
5504   S: When you use the "Filter" field, include the file specification or a
5505   complete directory specification, including the trailing "/" on Unix.  
5506   (See Help in the Open... dialog).
5508   **P: Find Again and Replace Again don't continue in the same direction as the original Find or Replace.**
5510   S: Find Again and Replace Again don't use the direction of the original
5511   search.  The Shift key controls the direction: Ctrl+G means forward,
5512   Shift+Ctrl+G means backward.
5514   **P: Preferences specified in the Preferences menu don't seem to get saved when I select Save Defaults.**
5516   S: NEdit has two kinds of preferences: 1) per-window preferences, in the
5517   Preferences menu, and 2) default settings for preferences in newly created
5518   windows, in the Default Settings sub-menu of the Preferences menu. 
5519   Per-window preferences are not saved by Save Defaults, only Default
5520   Settings.
5522   **P: Columns and indentation don't line up.**
5524   S: NEdit is using a proportional width font.  Set the font to a fixed style
5525   (see Preferences menu).
5527   **P: NEdit performs poorly on very large files.**
5529   S: Turn off Incremental Backup.  With Incremental Backup on, NEdit
5530   periodically writes a full copy of the file to disk.
5532   **P: Commands added to the Shell Commands menu (Unix only) don't output anything until they are finished executing.**
5534   S: If the command output is directed to a dialog, or the input is from a
5535   selection, output is collected together and held until the command
5536   completes.  De-select both of the options and the output will be shown
5537   incrementally as the command executes.
5539   **P: Dialogs don't automatically get keyboard focus when they pop up.**
5541   S: Most X Window managers allow you to choose between two categories of
5542   keyboard focus models: pointer focus, and explicit focus.  Pointer focus
5543   means that as you move the mouse around the screen, the window under the
5544   mouse automatically gets the keyboard focus.  NEdit users who use this
5545   focus model should set "Popups Under Pointer" in the Default Settings sub
5546   menu of the preferences menu in NEdit.  Users with the explicit focus
5547   model, in some cases, may have problems with certain dialogs, such as Find
5548   and Replace.  In MWM this is caused by the mwm resource startupKeyFocus
5549   being set to False (generally a bad choice for explicit focus users). 
5550   NCDwm users should use the focus model "click" instead of "explicit",
5551   again, unless you have set it that way to correct specific problems, this
5552   is the appropriate setting for most explicit focus users.
5554   **P: The Backspace key doesn't work, or deletes forward rather than backward.**
5556   S: While this is an X/Motif binding problem, and should be solved outside of
5557   NEdit in the Motif virtual binding layer (or possibly xmodmap or
5558   translations), NEdit provides an out.  If you set the resource:
5559   nedit.remapDeleteKey to True, NEdit will forcibly map the delete key to
5560   backspace.  The default setting of this resource recently changed, so
5561   users who have been depending on this remapping will now have to set it
5562   explicitly (or fix their bindings).
5564   **P: NEdit crashes when I try to paste text in to a text field in a dialog (like Find or Replace) on my SunOS system.**
5566   S: On many SunOS systems, you have to set up an nls directory before various
5567   inter-client communication features of Motif will function properly. 
5568   There are instructions in README.sun in /pub/v5_0_2/individual/README.sun on 
5569   ftp.nedit.org, as well as a tar file containing a complete nls 
5570   directory: ftp://ftp.nedit.org/pub/v5_0_2/nls.tar. 
5571   README.sun contains directions for setting up an nls directory, which
5572   is required by Motif for handling copy and paste to Motif text fields. 
5574 3>Known Defects
5576   Below is the list of known defects which affect NEdit. The defects your copy
5577   of NEdit will exhibit depend on which system you are running and with which
5578   Motif libraries it was built. Note that there are now Motif 1.2 and/or 2.0
5579   libraries available on ALL supported platforms, and as you can see below
5580   there are far fewer defects in Motif 1.2, so it is in your best interest to
5581   upgrade your system.
5583 4>All Versions
5585 **DEFECT**
5586   Operations between rectangular selections on overlapping lines do nothing.
5587   
5588 ~Work Around~
5589   None.  These operations are very complicated and rarely used.
5591 **DEFECT**
5592   Cut and Paste menu items fail, or possibly crash, 
5593   for very large (multi-megabyte) selections.
5594   
5595 ~Work Around~
5596   Use selection copy (middle mouse button click) 
5597   for transferring larger quantities of data. 
5598   Cut and Paste save the copied text in server 
5599   memory, which is usually limited.
5601 3>Reporting Defects
5603   Submit bugs through the web at:
5604   
5605     http://sf.net/tracker/?func=add&group_id=11005&atid=111005
5607   Please include the first few lines from Help > Version, which identifies
5608   NEdit's version and other system attributes important for diagnosing your
5609   problem.
5610   
5611   The NEdit developers subscribe to both discuss@@nedit.org and
5612   develop@@nedit.org, either of which may be used for reporting defects.  If
5613   you're not sure, or you think the report might be of interest to the general
5614   NEdit user community, send the report to discuss@@nedit.org_.  If it's
5615   something obvious and boring, like we misspelled "anemometer" in the on-line
5616   help, send it to develop@@nedit.org_.  If you don't want to subscribe to the
5617   Mailing_Lists_, please add a note to your mail about cc'ing you on responses.
5619   $$
5621 .. Hyperlinks for this document  ==============================================
5623 .. _discuss@@nedit.org   mailto:discuss@@nedit.org
5624 .. _announce@@nedit.org  mailto:announce@@nedit.org
5625 .. _develop@@nedit.org   mailto:develop@@nedit.org
5626 .. _discuss-request@@nedit.org   mailto:discuss-request@@nedit.org
5627 .. _announce-request@@nedit.org  mailto:announce-request@@nedit.org
5628 .. _develop-request@@nedit.org   mailto:develop-request@@nedit.org
5629 .. _http://www.nedit.org http://www.nedit.org
5630 .. _ctag_support         #ctags
5631 .. _Alternation          #alternation
5633 .. =============================================================================
5635 .. Below is what is used to guide the generation of 'C'-Motif menus.
5636 .. Indentation is SIGNIFICANT in the "Menu" directive lines below. It
5637 .. is used to determine under which menu element another item will belong.
5638 .. The number of spaces indented is not significant, but items to be placed
5639 .. in the same menu panel MUST line up at the same indent level.
5640 .. ALL nodes of this menu "tree" should have help name qualifiers.
5641 .. These are used to produce the internal lists used by NEdit help code.
5643 .. By default, the first character of the menu element will be used as a
5644 .. menu mneumonic key. To use another character in the menu element for this
5645 .. purpose, surround the character with underscores (eg. I w_a_nt 'a').
5647 .. The menu title MUST match the one found in the actual help text (sans
5648 .. special mneumonic key character marking). The help text title may include
5649 .. underlines (for spaces) when it is a hyperlink target.
5651 .. The Help-name is used to generate various data structure names. For
5652 .. instance, the 'start' help name will be used to generate the HelpTopic
5653 .. enumeration value HELP_START and the character array htxt_start which
5654 .. holds the actual help text used in the menu dialogs. Consequently, these
5655 .. names need to be unique and contain only the characters that a 'C'
5656 .. compiler can digest.
5658 .. Menu separator lines use a dash (-) character for the Menu Title. They
5659 .. should also have a unique Help-name.
5661 .. A numerical value following the Help-name (separated from the name by
5662 .. a comma and/or spaces) is part of a menu element hiding scheme implemented
5663 .. in buildHelpMenu (found in 'menu.c'). When the number matches the hideIt
5664 .. value found in the procedure, that element will effectively become invisible.
5665 .. This mechanism was created for particular menu features that are not
5666 .. available to all incarnations of NEdit (in this case, the VMS version).
5668 .. A "Help" directive is used for all other text used as NEdit help, but
5669 .. does not show up in the Help menu.
5671 ..       Menu Title                         # Help-name
5672 .. ------------------------------------------------------------
5673 .. Menu: Getting Started                    # start
5674 .. Menu: Basic Operation                    # basicOp
5675 .. Menu:   Selecting Text                   # select
5676 .. Menu:   Finding and Replacing Text       # search
5677 .. Menu:   Cut and Paste                    # clipboard
5678 .. Menu:   Using the Mouse                  # mouse
5679 .. Menu:   Keyboard Shortcuts               # keyboard
5680 .. Menu:   S_h_ifting and Filling           # fill
5681 .. Menu:   Tabbed Editing                   # interface
5682 .. Menu:   F_i_le Format                    # format
5684 .. Menu: Features for Programming           # features
5685 .. Menu:   Programming with NEdit           # programmer
5686 .. Menu:   Tabs/Emulated Tabs               # tabs
5687 .. Menu:   Auto/Smart Indent                # indent
5688 .. Menu:   Syntax Highlighting              # syntax
5689 .. Menu:   Finding Declarations (ctags)     # tags
5690 .. Menu:   Calltips                         # calltips
5692 .. Menu: Regular Expressions                # regex
5693 .. Menu:   Basic Regular Expression Syntax  # basicSyntax
5694 .. Menu:   Metacharacters                   # escapeSequences
5695 .. Menu:   Parenthetical Constructs         # parenConstructs
5696 .. Menu:   Advanced Topics                  # advancedTopics
5697 .. Menu:   Example Regular Expressions      # examples
5699 .. Menu: Macro/Shell Extensions             # extensions
5700 .. Menu:   Shell Commands and Filters       # shell, 1
5701 .. Menu:   Learn/Replay                     # learn
5702 .. Menu:   Macro Language                   # macro_lang
5703 .. Menu:   M_a_cro Subroutines              # macro_subrs
5704 .. Menu:   Range Sets                       # rangeset
5705 .. Menu:   Highlighting Information         # hiliteInfo
5706 .. Menu:   Action Routines                  # actions
5708 .. Menu: Customizing                        # customizing
5709 .. Menu:   Customizing NEdit                # customize
5710 .. Menu:   Preferences                      # preferences
5711 .. Menu:   X Resources                      # resources
5712 .. Menu:   Key Binding                      # binding
5713 .. Menu:   Highlighting Patterns            # patterns
5714 .. Menu:   Smart Indent Macros              # smart_indent
5716 .. Menu: NEdit Command Line                 # command_line
5717 .. Menu: Client/Server Mode                 # server
5718 .. Menu: Cr_a_sh Recovery                   # recovery
5719 .. Menu: ---------------------------------- # separator1
5720 .. Menu: Version                            # version
5721 .. Menu: GNU General Public License         # distribution
5722 .. Menu: Mailing _L_ists                    # mailing_list
5723 .. Menu: Problems/Defects                   # defects
5724 .. ------------------------------------------------------------
5725 .. Help: Tabs Dialog                        # tabs_dialog
5726 .. Help: Customize Window Title Dialog      # custom_title_dialog