1 /*******************************************************************************
3 * help_data.h -- Nirvana Editor help module data *
5 Generated on Feb 10, 2005 (Do NOT edit!)
6 Source of content from file help.etx
8 * Copyright (c) 1999-2005 Mark Edel *
10 * This is free software; you can redistribute it and/or modify it under the *
11 * terms of the GNU General Public License as published by the Free Software *
12 * Foundation; either version 2 of the License, or (at your option) any later *
15 * This software is distributed in the hope that it will be useful, but WITHOUT *
16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
20 * In addition, as a special exception to the GNU GPL, the copyright holders *
21 * give permission to link the code of this program with the Motif and Open *
22 * Motif libraries (or with modified versions of these that use the same *
23 * license), and distribute linked combinations including the two. You must *
24 * obey the GNU General Public License in all respects for all of the code used *
25 * other than linking with Motif/Open Motif. If you modify this file, you may *
26 * extend this exception to your version of the file, but you are not obligated *
27 * to do so. If you do not wish to do so, delete this exception statement from *
30 * You should have received a copy of the GNU General Public License along with *
31 * software; if not, write to the Free Software Foundation, Inc., 59 Temple *
32 * Place, Suite 330, Boston, MA 02111-1307 USA *
34 * Nirvana Text Editor *
35 * September 10, 1991 *
37 * Written by Mark Edel *
39 *******************************************************************************/
41 char *HelpTitles
[] = {
44 "Finding and Replacing Text",
48 "Shifting and Filling",
51 "Programming with NEdit",
54 "Syntax Highlighting",
55 "Finding Declarations (ctags)",
57 "Basic Regular Expression Syntax",
59 "Parenthetical Constructs",
61 "Example Regular Expressions",
62 "Shell Commands and Filters",
67 "Highlighting Information",
73 "Highlighting Patterns",
74 "Smart Indent Macros",
79 "GNU General Public License",
83 "Customize Window Title Dialog",
87 static char * htxt_start
[] = {
88 "\01IWelcome to NEdit! ",
90 "NEdit is a standard GUI (Graphical User Interface) style text editor for ",
91 "programs and plain-text files. Users of Macintosh and MS Windows based text ",
92 "editors should find NEdit a familiar and comfortable environment. NEdit ",
93 "provides all of the standard menu, dialog, editing, and mouse support, as ",
94 "well as all of the standard shortcuts to which the users of modern GUI based ",
95 "environments are accustomed. For users of older style Unix editors, welcome ",
96 "to the world of mouse-based editing! ",
98 "Help sections of interest to new users are listed under the \"Basic Operation\" ",
99 "heading in the top-level Help menu: ",
101 "\01A \01QSelecting Text\01A\n",
102 " \01QFinding and Replacing Text\01A\n",
103 " \01QCut and Paste\01A\n",
104 " \01QUsing the Mouse\01A\n",
105 " \01QKeyboard Shortcuts\01A\n",
106 " \01QShifting and Filling\01A\n",
108 "Programmers should also read the introductory section under the \"Features for ",
109 "Programming\" section: ",
111 "\01A \01QProgramming with NEdit\01A\n",
113 "If you get into trouble, the Undo command in the Edit menu can reverse any ",
114 "modifications that you make. NEdit does not change the file you are editing ",
115 "until you tell it to Save. ",
117 "\01REditing an Existing File\01I",
119 "To open an existing file, choose Open... from the file menu. Select the file ",
120 "that you want to open in the pop-up dialog that appears and click on OK. You ",
121 "may open any number of files at the same time. Depending on your settings ",
122 "(cf. \"\01QTabbed Editing\01I\") each file can appear in its own editor window, or it ",
123 "can appear under a tab in the same editor window. Using Open... rather than ",
124 "re-typing the NEdit command and running additional copies of NEdit, will give ",
125 "you quick access to all of the files you have open via the Windows menu, and ",
126 "ensure that you don't accidentally open the same file twice. NEdit has no ",
127 "\"main\" window. It remains running as long as at least one editor window is ",
130 "\01RCreating a New File\01I",
132 "If you already have an empty (Untitled) window displayed, just begin typing ",
133 "in the window. To create a new Untitled window, choose New Window or New Tab ",
134 "from the File menu. To give the file a name and save its contents to the ",
135 "disk, choose Save or Save As... from the File menu. ",
137 "\01RBackup Files\01I",
139 "NEdit maintains periodic backups of the file you are editing so that you can ",
140 "recover the file in the event of a problem such as a system crash, network ",
141 "failure, or X server crash. These files are saved under the name `~filename` ",
142 "(on Unix) or `_filename` (on VMS), where filename is the name of the file you ",
143 "were editing. If an NEdit process is killed, some of these backup files may ",
144 "remain in your directory. (To remove one of these files on Unix, you may ",
145 "have to prefix the `~' (tilde) character with a (backslash) to prevent the ",
146 "shell from interpreting it as a special character.) ",
150 "As you become more familiar with NEdit, substitute the control and function ",
151 "keys shown on the right side of the menus for pulling down menus with the ",
154 "Dialogs are also streamlined so you can enter information quickly and without ",
155 "using the mouse*. To move the keyboard focus around a dialog, use the tab ",
156 "and arrow keys. One of the buttons in a dialog is usually drawn with a ",
157 "thick, indented, outline. This button can be activated by pressing Return or ",
158 "Enter. The Cancel or Dismiss button can be activated by pressing escape. ",
159 "For example, to replace the string \"thing\" with \"things\" type: ",
161 "\01A <ctrl-r>thing<tab>things<return>\n",
163 "To open a file named \"whole_earth.c\", type: ",
165 "\01A <ctrl-o>who<return>\n",
167 "(how much of the filename you need to type depends on the other files in the ",
168 "directory). See the section called \"\01QKeyboard Shortcuts\01I\" for more details. ",
170 "* Users who have set their keyboard focus mode to \"pointer\" should set ",
171 "\"Popups Under Pointer\" in the Default Settings menu to avoid the additional ",
172 "step of moving the mouse into the dialog. ",
176 static char * htxt_select
[] = {
177 "\01INEdit has two general types of selections, primary (highlighted text), and ",
178 "secondary (underlined text). Selections can cover either a simple range of ",
179 "text between two points in the file, or they can cover a rectangular area of ",
180 "the file. Rectangular selections are only useful with non-proportional (fixed ",
183 "To select text for copying, deleting, or replacing, press the left mouse ",
184 "button with the pointer at one end of the text you want to select, and drag ",
185 "it to the other end. The text will become highlighted. To select a whole ",
186 "word, double click (click twice quickly in succession). Double clicking and ",
187 "then dragging the mouse will select a number of words. Similarly, you can ",
188 "select a whole line or a number of lines by triple clicking or triple ",
189 "clicking and dragging. Quadruple clicking selects the whole file. After ",
190 "releasing the mouse button, you can still adjust a selection by holding down ",
191 "the shift key and dragging on either end of the selection. To delete the ",
192 "selected text, press delete or backspace. To replace it, begin typing. ",
194 "To select a rectangle or column of text, hold the Ctrl key while dragging the ",
195 "mouse. Rectangular selections can be used in any context that normal ",
196 "selections can be used, including cutting and pasting, filling, shifting, ",
197 "dragging, and searching. Operations on rectangular selections automatically ",
198 "fill in tabs and spaces to maintain alignment of text within and to the right ",
199 "of the selection. Note that the interpretation of rectangular selections by ",
200 "Fill Paragraph is slightly different from that of other commands, the section ",
201 "titled \"\01QShifting and Filling\01I\" has details. ",
203 "The middle mouse button can be used to make an additional selection (called ",
204 "the secondary selection). As soon as the button is released, the contents of ",
205 "this selection will be copied to the insert position of the window where the ",
206 "mouse was last clicked (the destination window). This position is marked by a ",
207 "caret shaped cursor when the mouse is outside of the destination window. If ",
208 "there is a (primary) selection, adjacent to the cursor in the window, the new ",
209 "text will replace the selected text. Holding the shift key while making the ",
210 "secondary selection will move the text, deleting it at the site of the ",
211 "secondary selection, rather than copying it. ",
213 "Selected text can also be dragged to a new location in the file using the ",
214 "middle mouse button. Holding the shift key while dragging the text will copy ",
215 "the selected text, leaving the original text in place. Holding the control ",
216 "key will drag the text in overlay mode. ",
218 "Normally, dragging moves text by removing it from the selected position at ",
219 "the start of the drag, and inserting it at a new position relative to to the ",
220 "mouse. Dragging a block of text over existing characters, displaces the ",
221 "characters to the end of the selection. In overlay mode, characters which are ",
222 "occluded by blocks of text being dragged are simply removed. When dragging ",
223 "non-rectangular selections, overlay mode also converts the selection to ",
224 "rectangular form, allowing it to be dragged outside of the bounds of the ",
227 "The section \"\01QUsing the Mouse\01I\" summarizes the mouse commands for making primary ",
228 "and secondary selections. Primary selections can also be made via keyboard ",
229 "commands, see \"\01QKeyboard Shortcuts\01I\". ",
233 static char * htxt_search
[] = {
234 "\01IThe 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 \01QSelecting Text\01I). 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 ",
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 ",
265 "\01RSearching Backwards\01I",
267 "Holding down the shift key while choosing any of the search or replace ",
268 "commands from the menu (or using the keyboard shortcut), will search in the ",
269 "reverse direction. Users who have set the search direction using the buttons ",
270 "in the search dialog, may find it a bit confusing that Find Again and Replace ",
271 "Again don't continue in the same direction as the original search (for ",
272 "experienced users, consistency of the direction implied by the shift key is ",
275 "\01RSelective Replacement\01I",
277 "To replace only some occurrences of a string within a file, choose Replace... ",
278 "from the Search menu, enter the string to search for and the string to ",
279 "substitute, and finish by pressing the Find button. When the first ",
280 "occurrence is highlighted, use either Replace Again (^T) to replace it, or ",
281 "Find Again (^G) to move to the next occurrence without replacing it, and ",
282 "continue in such a manner through all occurrences of interest. ",
284 "To replace all occurrences of a string within some range of text, select the ",
285 "range (see \01QSelecting Text\01I), choose Replace... from the Search menu, type the ",
286 "string to search for and the string to substitute, and press the \"R. in ",
287 "Selection\" button in the dialog. Note that selecting text in the Replace... ",
288 "dialog will unselect the text in the window. ",
292 static char * htxt_clipboard
[] = {
293 "\01IThe easiest way to copy and move text around in your file or between windows, ",
294 "is to use the clipboard, an imaginary area that temporarily stores text and ",
295 "data. The Cut command removes the selected text (see \01QSelecting Text\01I) from ",
296 "your file and places it in the clipboard. Once text is in the clipboard, the ",
297 "Paste command will copy it to the insert position in the current window. For ",
298 "example, to move some text from one place to another, select it by dragging ",
299 "the mouse over it, choose Cut to remove it, click the pointer to move the ",
300 "insert point where you want the text inserted, then choose Paste to insert ",
301 "it. Copy copies text to the clipboard without deleting it from your file. ",
302 "You can also use the clipboard to transfer text to and from other Motif ",
303 "programs and X programs which make proper use of the clipboard. ",
305 "There are many other methods for copying and moving text within NEdit windows ",
306 "and between NEdit and other programs. The most common such method is ",
307 "clicking the middle mouse button to copy the primary selection (to the ",
308 "clicked position). Copying the selection by clicking the middle mouse button ",
309 "in many cases is the only way to transfer data to and from many X programs. ",
310 "Holding the Shift key while clicking the middle mouse button moves the text, ",
311 "deleting it from its original position, rather than copying it. Other ",
312 "methods for transferring text include secondary selections, primary selection ",
313 "dragging, keyboard-based selection copying, and drag and drop. These are ",
314 "described in detail in the sections: \"\01QSelecting Text\01I\", \"\01QUsing the Mouse\01I\", ",
315 "and \"\01QKeyboard Shortcuts\01I\". ",
319 static char * htxt_mouse
[] = {
320 "\01IMouse-based editing is what NEdit is all about, and learning to use the more ",
321 "advanced features like secondary selections and primary selection dragging ",
322 "will be well worth your while. ",
324 "If you don't have time to learn everything, you can get by adequately with ",
325 "just the left mouse button: Clicking the left button moves the cursor. ",
326 "Dragging with the left button makes a selection. Holding the shift key while ",
327 "clicking extends the existing selection, or begins a selection between the ",
328 "cursor and the mouse. Double or triple clicking selects a whole word or a ",
331 "This section will make more sense if you also read the section called, ",
332 "\"\01QSelecting Text\01I\", which explains the terminology of selections, that is, ",
333 "what is meant by primary, secondary, rectangular, etc. ",
335 "\01RButton and Modifier Key Summary\01I",
337 "General meaning of mouse buttons and modifier keys: ",
341 "\01A Button 1 (left) Cursor position and primary selection\n",
343 "\01A Button 2 (middle) Secondary selections, and dragging and\n",
344 " copying the primary selection\n",
346 "\01A Button 3 (right) Quick-access programmable menu and pan\n",
349 "\01S Modifier keys\01I",
351 "\01A Shift On primary selections, (left mouse button):\n",
352 " Extends selection to the mouse pointer\n",
353 " On secondary and copy operations, (middle):\n",
354 " Toggles between move and copy\n",
356 "\01A Ctrl Makes selection rectangular or insertion\n",
359 "\01A Alt* (on release) Exchange primary and secondary\n",
362 "\01RLeft Mouse Button\01I",
364 "The left mouse button is used to position the cursor and to make primary ",
367 "\01A Click Moves the cursor\n",
369 "\01A Double Click Selects a whole word\n",
371 "\01A Triple Click Selects a whole line\n",
373 "\01A Quad Click Selects the whole file\n",
375 "\01A Shift Click Adjusts (extends or shrinks) the\n",
376 " selection, or if there is no existing\n",
377 " selection, begins a new selection\n",
378 " between the cursor and the mouse.\n",
380 "\01A Ctrl+Shift+ Adjusts (extends or shrinks) the\n",
381 " Click selection rectangularly.\n",
383 "\01A Drag Selects text between where the mouse\n",
384 " was pressed and where it was released.\n",
386 "\01A Ctrl+Drag Selects rectangle between where the\n",
387 " mouse was pressed and where it was\n",
390 "\01RRight Mouse Button\01I",
392 "The right mouse button posts a programmable menu for frequently used commands. ",
394 "\01A Click/Drag Pops up the background menu (programmed\n",
395 " from Preferences -> Default Settings ->\n",
396 " Customize Menus -> Window Background).\n",
398 "\01A Ctrl+Drag Pan scrolling. Scrolls the window\n",
399 " both vertically and horizontally, as if\n",
400 " you had grabbed it with your mouse.\n",
402 "\01RMiddle Mouse Button\01I",
404 "The middle mouse button is for making secondary selections, and copying and ",
405 "dragging the primary selection. ",
407 "\01A Click Copies the primary selection to the\n",
408 " clicked position.\n",
410 "\01A Shift+Click Moves the primary selection to the\n",
411 " clicked position, deleting it from its\n",
412 " original position.\n",
414 "\01A Drag 1) Outside of the primary selection:\n",
415 " Begins a secondary selection.\n",
416 " 2) Inside of the primary selection:\n",
417 " Moves the selection by dragging.\n",
419 "\01A Ctrl+Drag 1) Outside of the primary selection:\n",
420 " Begins a rectangular secondary\n",
422 " 2) Inside of the primary selection:\n",
423 " Drags the selection in overlay\n",
424 " mode (see below).\n",
426 "When the mouse button is released after creating a secondary selection: ",
428 "\01A No Modifiers If there is a primary selection,\n",
429 " replaces it with the secondary\n",
430 " selection. Otherwise, inserts the\n",
431 " secondary selection at the cursor\n",
434 "\01A Shift Move the secondary selection, deleting\n",
435 " it from its original position. If\n",
436 " there is a primary selection, the move\n",
437 " will replace the primary selection\n",
438 " with the secondary selection.\n",
439 " Otherwise, moves the secondary\n",
440 " selection to to the cursor position.\n",
442 "\01A Alt* Exchange the primary and secondary\n",
445 "While moving the primary selection by dragging with the middle mouse button: ",
447 "\01A Shift Leaves a copy of the original\n",
448 " selection in place rather than\n",
449 " removing it or blanking the area.\n",
451 "\01A Ctrl Changes from insert mode to overlay\n",
452 " mode (see below).\n",
454 "\01A Escape Cancels drag in progress.\n",
456 "Overlay Mode: Normally, dragging moves text by removing it from the selected ",
457 "position at the start of the drag, and inserting it at a new position ",
458 "relative to to the mouse. When you drag a block of text over existing ",
459 "characters, the existing characters are displaced to the end of the ",
460 "selection. In overlay mode, characters which are occluded by blocks of text ",
461 "being dragged are simply removed. When dragging non-rectangular selections, ",
462 "overlay mode also converts the selection to rectangular form, allowing it to ",
463 "be dragged outside of the bounds of the existing text. ",
465 "Mouse buttons 4 and 5 are usually represented by a mouse wheel nowadays. ",
466 "They are used to scroll up or down in the text window. ",
468 "* The Alt key may be labeled Meta or Compose-Character on some keyboards. ",
469 "Some window managers, including default configurations of mwm, bind ",
470 "combinations of the Alt key and mouse buttons to window manager operations. ",
471 "In NEdit, Alt is only used on button release, so regardless of the window ",
472 "manager bindings for Alt-modified mouse buttons, you can still do the ",
473 "corresponding NEdit operation by using the Alt key AFTER the initial mouse ",
474 "press, so that Alt is held while you release the mouse button. If you find ",
475 "this difficult or annoying, you can re-configure most window managers to skip ",
476 "this binding, or you can re-configure NEdit to use a different key ",
481 static char * htxt_keyboard
[] = {
482 "\01IMost of the keyboard shortcuts in NEdit are shown on the right hand sides of ",
483 "the pull-down menus. However, there are more which are not as obvious. These ",
484 "include; dialog button shortcuts; menu and dialog mnemonics; labeled keyboard ",
485 "keys, such as the arrows, page-up, page-down, and home; and optional Shift ",
486 "modifiers on accelerator keys, like [Shift]Ctrl+F. ",
488 "\01RMenu Accelerators\01I",
490 "Pressing the key combinations shown on the right of the menu items is a ",
491 "shortcut for selecting the menu item with the mouse. Some items have the shift ",
492 "key enclosed in brackets, such as [Shift]Ctrl+F. This indicates that the shift ",
493 "key is optional. In search commands, including the shift key reverses the ",
494 "direction of the search. In Shift commands, it makes the command shift the ",
495 "selected text by a whole tab stop rather than by single characters. ",
497 "\01RMenu Mnemonics\01I",
499 "Pressing the Alt key in combination with one of the underlined characters in ",
500 "the menu bar pulls down that menu. Once the menu is pulled down, typing the ",
501 "underlined characters in a menu item (without the Alt key) activates that ",
502 "item. With a menu pulled down, you can also use the arrow keys to select menu ",
503 "items, and the Space or Enter keys to activate them. ",
505 "\01RKeyboard Shortcuts within Dialogs\01I",
507 "One button in a dialog is usually marked with a thick indented outline. ",
508 "Pressing the Return or Enter key activates this button. ",
510 "All dialogs have either a Cancel or Dismiss button. This button can be ",
511 "activated by pressing the Escape (or Esc) key. ",
513 "Pressing the tab key moves the keyboard focus to the next item in a dialog. ",
514 "Within an associated group of buttons, the arrow keys move the focus among the ",
515 "buttons. Shift+Tab moves backward through the items. ",
517 "Most items in dialogs have an underline under one character in their name. ",
518 "Pressing the Alt key along with this character, activates a button as if you ",
519 "had pressed it with the mouse, or moves the keyboard focus to the associated ",
520 "text field or list. ",
522 "You can select items from a list by using the arrow keys to move the ",
523 "selection and space to select. ",
525 "In file selection dialogs, you can type the beginning characters of the file ",
526 "name or directory in the list to select files ",
528 "\01RLabeled Function Keys\01I",
530 "The labeled function keys on standard workstation and PC keyboards, like the ",
531 "arrows, and page-up and page-down, are active in NEdit, though not shown in the ",
534 "Holding down the control key while pressing a named key extends the scope of ",
535 "the action that it performs. For example, Home normally moves the insert ",
536 "cursor the beginning of a line. Ctrl+Home moves it to the beginning of the ",
537 "file. Backspace deletes one character, Ctrl+Backspace deletes one word. ",
539 "Holding down the shift key while pressing a named key begins or extends a ",
540 "selection. Combining the shift and control keys combines their actions. For ",
541 "example, to select a word without using the mouse, position the cursor at the ",
542 "beginning of the word and press Ctrl+Shift+RightArrow. The Alt key modifies ",
543 "selection commands to make the selection rectangular. ",
545 "Under X and Motif, there are several levels of translation between keyboard ",
546 "keys and the actions they perform in a program. The \"\01QCustomizing NEdit\01I\", and ",
547 "\"\01QX Resources\01I\" sections of the Help menu have more information on this subject. ",
548 "Because of all of this configurability, and since keyboards and standards for ",
549 "the meaning of some keys vary from machine to machine, the mappings may be ",
550 "changed from the defaults listed below. ",
552 "\01RModifier Keys (in general)\01I",
554 "\01A Ctrl Extends the scope of the action that the key\n",
555 " would otherwise perform. For example, Home\n",
556 " normally moves the insert cursor to the beginning\n",
557 " of a line. Ctrl+Home moves it to the beginning of\n",
558 " the file. Backspace deletes one character, Ctrl+\n",
559 " Backspace deletes one word.\n",
561 "\01A Shift Extends the selection to the cursor position. If\n",
562 " there's no selection, begins one between the old\n",
563 " and new cursor positions.\n",
565 "\01A Alt When modifying a selection, makes the selection\n",
568 "(For the effects of modifier keys on mouse button presses, see the section ",
569 "titled \"\01QUsing the Mouse\01I\") ",
571 "\01RAll Keyboards\01I",
573 "\01A Escape Cancels operation in progress: menu\n",
574 " selection, drag, selection, etc. Also\n",
575 " equivalent to cancel button in dialogs.\n",
577 "\01A Backspace Delete the character before the cursor\n",
579 "\01A Ctrl+BS Delete the word before the cursor\n",
583 "\01A Left Move the cursor to the left one character\n",
585 "\01A Ctrl+Left Move the cursor backward one word\n",
586 " (Word delimiters are settable, see\n",
587 " \"\01QCustomizing NEdit\01A\", and \"\01QX Resources\01A\")\n",
589 "\01A Right Move the cursor to the right one character\n",
591 "\01A Ctrl+Right Move the cursor forward one word\n",
593 "\01A Up Move the cursor up one line\n",
595 "\01A Ctrl+Up Move the cursor up one paragraph.\n",
596 " (Paragraphs are delimited by blank lines)\n",
598 "\01A Down Move the cursor down one line.\n",
600 "\01A Ctrl+Down Move the cursor down one paragraph.\n",
602 "\01A Ctrl+Return Return with automatic indent, regardless\n",
603 " of the setting of Auto Indent.\n",
605 "\01A Shift+Return Return without automatic indent,\n",
606 " regardless of the setting of Auto Indent.\n",
608 "\01A Ctrl+Tab Insert an ASCII tab character, without\n",
609 " processing emulated tabs.\n",
611 "\01A Alt+Ctrl+<c> Insert the control-code equivalent of\n",
614 "\01A Ctrl+/ Select everything (same as Select\n",
615 " All menu item or ^A)\n",
617 "\01A Ctrl+\\ Unselect\n",
619 "\01A Ctrl+U Delete to start of line\n",
621 "\01RPC Standard Keyboard\01I",
623 "\01A Ctrl+Insert Copy the primary selection to the\n",
624 " clipboard (same as Copy menu item or ^C)\n",
625 " for compatibility with Motif standard key\n",
628 " Insert Copy the primary selection to the cursor\n",
631 "\01A Delete Delete the character before the cursor.\n",
632 " (Can be configured to delete the character\n",
633 " after the cursor, see \"\01QCustomizing NEdit\01A\",\n",
634 " and \"\01QX Resources\01A\")\n",
636 "\01A Ctrl+Delete Delete to end of line.\n",
638 "\01A Shift+Delete Cut, remove the currently selected text\n",
639 " and place it in the clipboard. (same as\n",
640 " Cut menu item or ^X) for compatibility\n",
641 " with Motif standard key binding\n",
643 " Delete Cut the primary selection to the cursor\n",
646 "\01A Home Move the cursor to the beginning of the\n",
649 "\01A Ctrl+Home Move the cursor to the beginning of the\n",
652 "\01A End Move the cursor to the end of the line\n",
654 "\01A Ctrl+End Move the cursor to the end of the file\n",
656 "\01A PageUp Scroll and move the cursor up by one page.\n",
658 "\01A PageDown Scroll and move the cursor down by one\n",
661 "\01A F10 Make the menu bar active for keyboard\n",
662 " input (Arrow Keys, Return, Escape,\n",
663 " and the Space Bar)\n",
665 "\01A Alt+Home Switch to the previously active document.\n",
667 "\01A Ctrl+PageUp Switch to the previous document.\n",
669 "\01A Ctrl+PageDown Switch to the next document.\n",
671 "\01RSpecialty Keyboards \01I",
673 "On machines with different styles of keyboards, generally, text editing ",
674 "actions are properly matched to the labeled keys, such as Remove, ",
675 "Next-screen, etc.. If you prefer different key bindings, see the section ",
676 "titled \"\01QKey Binding\01I\" under the Customizing heading in the Help menu. ",
680 static char * htxt_fill
[] = {
681 "\01RShift Left, Shift Right\01I",
683 "While shifting blocks of text is most important for programmers (See Features ",
684 "for Programming), it is also useful for other tasks, such as creating ",
685 "indented paragraphs. ",
687 "To shift a block of text one tab stop to the right, select the text, then ",
688 "choose Shift Right from the Edit menu. Note that the accelerator keys for ",
689 "these menu items are Ctrl+9 and Ctrl+0, which correspond to the right and ",
690 "left parenthesis on most keyboards. Remember them as adjusting the text in ",
691 "the direction pointed to by the parenthesis character. Holding the Shift key ",
692 "while selecting either Shift Left or Shift Right will shift the text by one ",
695 "It is also possible to shift blocks of text by selecting the text ",
696 "rectangularly, and dragging it left or right (and up or down as well). Using ",
697 "a rectangular selection also causes tabs within the selection to be ",
698 "recalculated and substituted, such that the non-whitespace characters remain ",
699 "stationary with respect to the selection. ",
703 "Text filling using the Fill Paragraph command in the Edit menu is one of the ",
704 "most important concepts in NEdit. And it will be well worth your while to ",
705 "understand how to use it properly. ",
707 "In plain text files, unlike word-processor files, there is no way to tell ",
708 "which lines are continuations of other lines, and which lines are meant to be ",
709 "separate, because there is no distinction in meaning between newline ",
710 "characters which separate lines in a paragraph, and ones which separate ",
711 "paragraphs from other text. This makes it impossible for a text editor like ",
712 "NEdit to tell parts of the text which belong together as a paragraph from ",
713 "carefully arranged individual lines. ",
715 "In continuous wrap mode (Preferences -> Wrap -> Continuous), lines ",
716 "automatically wrap and unwrap themselves to line up properly at the right ",
717 "margin. In this mode, you simply omit the newlines within paragraphs and let ",
718 "NEdit make the line breaks as needed. Unfortunately, continuous wrap mode is ",
719 "not appropriate in the majority of situations, because files with extremely ",
720 "long lines are not common under Unix and may not be compatible with all ",
721 "tools, and because you can't achieve effects like indented sections, columns, ",
722 "or program comments, and still take advantage of the automatic wrapping. ",
724 "Without continuous wrapping, paragraph filling is not entirely automatic. ",
725 "Auto-Newline wrapping keeps paragraphs lined up as you type, but once ",
726 "entered, NEdit can no longer distinguish newlines which join wrapped text, ",
727 "and newlines which must be preserved. Therefore, editing in the middle of a ",
728 "paragraph will often leave the right margin messy and uneven. ",
730 "Since NEdit can't act automatically to keep your text lined up, you need to ",
731 "tell it explicitly where to operate, and that is what Fill Paragraph is for. ",
732 "It arranges lines to fill the space between two margins, wrapping the lines ",
733 "neatly at word boundaries. Normally, the left margin for filling is inferred ",
734 "from the text being filled. The first line of each paragraph is considered ",
735 "special, and its left indentation is maintained separately from the remaining ",
736 "lines (for leading indents, bullet points, numbered paragraphs, etc.). ",
737 "Otherwise, the left margin is determined by the furthest left non-whitespace ",
738 "character. The right margin is either the Wrap Margin, set in the ",
739 "preferences menu (by default, the right edge of the window), or can also be ",
740 "chosen on the fly by using a rectangular selection (see below). ",
742 "There are three ways to use Fill Paragraph. The simplest is, while you are ",
743 "typing text, and there is no selection, simply select Fill Paragraph (or type ",
744 "Ctrl+J), and NEdit will arrange the text in the paragraph adjacent to the ",
745 "cursor. A paragraph, in this case, means an area of text delimited by blank ",
748 "The second way to use Fill Paragraph is with a selection. If you select a ",
749 "range of text and then chose Fill Paragraph, all of the text in the selection ",
750 "will be filled. Again, continuous text between blank lines is interpreted as ",
751 "paragraphs and filled individually, respecting leading indents and blank ",
754 "The third, and most versatile, way to use Fill Paragraph is with a ",
755 "rectangular selection. Fill Paragraph treats rectangular selections ",
756 "differently from other commands. Instead of simply filling the text inside ",
757 "the rectangular selection, NEdit interprets the right edge of the selection ",
758 "as the requested wrap margin. Text to the left of the selection is not ",
759 "disturbed (the usual interpretation of a rectangular selection), but text to ",
760 "the right of the selection is included in the operation and is pulled in to ",
761 "the selected region. This method enables you to fill text to an arbitrary ",
762 "right margin, without going back and forth to the wrap-margin dialog, as well ",
763 "as to exclude text to the left of the selection such as comment bars or other ",
768 static char * htxt_interface
[] = {
769 "\01INEdit is able to display files in distinct editor windows, or to display files ",
770 "under tabs in the same editor window. The Options for controlling the tabbed ",
771 "interface are found under Preferences -> Default Settings -> Tabbed Editing ",
772 "(cf. \"\01QPreferences\01I\", also \"\01QNEdit Command Line\01I\"). ",
774 "Notice that you can re-group tabs at any time by detaching and attaching them, ",
775 "or moving them, to other windows. This can be done using the Windows menu, or ",
776 "using the context menu, which pops up when right clicking on a tab. ",
778 "You can switch to a tab by simply clicking on it, or you can use the keyboard. ",
779 "The default keybindings to switch tabs (which are Ctrl+PageUp/-Down and Alt+Home, ",
780 "see \"\01QKeyboard Shortcuts\01I\") can be changed using the actions previous_document(), ",
781 "next_document() and last_document(). ",
786 static char * htxt_format
[] = {
787 "\01IWhile plain-text is probably the simplest and most interchangeable file ",
788 "format in the computer world, there is still variation in what plain-text ",
789 "means from system to system. Plain-text files can differ in character set, ",
790 "line termination, and wrapping. ",
792 "While character set differences are the most obvious and pose the most ",
793 "challenge to portability, they affect NEdit only indirectly via the same font ",
794 "and localization mechanisms common to all X applications. If your system is ",
795 "set up properly, you will probably never see character-set related problems ",
796 "in NEdit. NEdit can not display Unicode text files, or any multi-byte ",
799 "The primary difference between an MS DOS format file and a Unix format file, ",
800 "is how the lines are terminated. Unix uses a single newline character. MS ",
801 "DOS uses a carriage-return and a newline. NEdit can read and write both file ",
802 "formats, but internally, it uses the single character Unix standard. NEdit ",
803 "auto-detects MS DOS format files based on the line termination at the start ",
804 "of the file. Files are judged to be DOS format if all of the first five line ",
805 "terminators, within a maximum range, are DOS-style. To change the format in ",
806 "which NEdit writes a file from DOS to Unix or visa versa, use the Save As... ",
807 "command and check or un-check the MS DOS Format button. ",
809 "Wrapping within text files can vary among individual users, as well as from ",
810 "system to system. Both Windows and MacOS make frequent use of plain text ",
811 "files with no implicit right margin. In these files, wrapping is determined ",
812 "by the tool which displays them. Files of this style also exist on Unix ",
813 "systems, despite the fact that they are not supported by all Unix utilities. ",
814 "To display this kind of file properly in NEdit, you have to select the wrap ",
815 "style called Continuous. Wrapping modes are discussed in the sections: ",
816 "Customizing -> Preferences, and Basic Operation -> Shifting and Filling. ",
818 "The last and most minute of format differences is the terminating newline. ",
819 "Some Unix compilers and utilities require a final terminating newline on all ",
820 "files they read and fail in various ways on files which do not have it. Vi ",
821 "and approximately half of Unix editors enforce the terminating newline on all ",
822 "files that they write; Emacs does not enforce this rule. Users are divided ",
823 "on which is best. NEdit makes the final terminating newline optional ",
824 "(Preferences -> Default Settings -> Terminate with Line Break on Save). ",
828 static char * htxt_programmer
[] = {
829 "\01IThough general in appearance, NEdit has many features intended specifically ",
830 "for programmers. Major programming-related topics are listed in separate ",
831 "sections under the heading: \"Features for Programming\": \01QSyntax Highlighting\01I, ",
832 "\01QTabs/Emulated Tabs\01I, \01QFinding Declarations (ctags)\01I, \01QCalltips\01I, and ",
833 "\01QAuto/Smart Indent\01I. Minor topics related to programming are discussed below: ",
835 "\01RLanguage Modes\01I",
837 "When NEdit initially reads a file, it attempts to determine whether the file ",
838 "is in one of the computer languages that it knows about. Knowing what language ",
839 "a file is written in allows NEdit to assign highlight patterns and smart indent ",
840 "macros, and to set language specific preferences like word delimiters, tab ",
841 "emulation, and auto-indent. Language mode can be recognized from both the file ",
842 "name and from the first 200 characters of content. Language mode recognition ",
843 "and language-specific preferences are configured in: Preferences -> Default ",
844 "Settings -> Language Modes.... ",
846 "You can set the language mode manually for a window, by selecting it from the ",
847 "menu: Preferences -> Language Modes. ",
849 "\01RBacklighting [EXPERIMENTAL]\01I",
851 "NEdit can be made to set the background color of particular classes of ",
852 "characters to allow easy identification of those characters. This is ",
853 "particularly useful if you need to be able to distinguish between tabs ",
854 "and spaces in a file where the difference is important. The colors used ",
855 "for backlighting are specified by a resource, \"nedit*backlightCharTypes\". ",
856 "You can turn backlighting on and off through the ",
857 "Preferences -> Apply Backlighting menu entry. ",
859 "If you prefer to have backlighting turned on for all new windows, use ",
860 "the Preferences -> Default Settings -> Apply Backlighting menu entry. ",
861 "This settings can be saved along with other preferences using ",
862 "Preferences -> Save Defaults. ",
864 "\01JImportant:\01I In future versions of NEdit, the backlighting feature will be ",
865 "extended and reworked such that it becomes easier to configure. The current ",
866 "way of controlling it through a resource is generally considered to be below ",
867 "NEdit's usability standards. These future changes are likely to be ",
868 "incompatible with the current format of the \"nedit*backlightCharTypes\" ",
869 "resource, though. Therefore, it is expected that there will be no automatic ",
870 "migration path for users who customize the resource. ",
872 "\01RLine Numbers\01I",
874 "To find a particular line in a source file by line number, choose Goto Line ",
875 "#... from the Search menu. You can also directly select the line number text ",
876 "in the compiler message in the terminal emulator window (xterm, decterm, ",
877 "winterm, etc.) where you ran the compiler, and choose Goto Selected from the ",
880 "To find out the line number of a particular line in your file, turn on ",
881 "Statistics Line in the Preferences menu and position the insertion point ",
882 "anywhere on the line. The statistics line continuously updates the line number ",
883 "of the line containing the cursor. ",
885 "To go to a specific column on a given line, choose Goto Line #... from the ",
886 "Search menu and enter a line number and a column number separated by a ",
887 "comma. (e.g. Enter \"100,12\" for line 100 column 12.) If you want to go to ",
888 "a column on the current line just leave out the line number. (e.g. Enter ",
889 "\",45\" to go the column 45 on the current line.) ",
891 "\01RMatching Parentheses\01I",
893 "To help you inspect nested parentheses, brackets, braces, quotes, and other ",
894 "characters, NEdit has both an automatic parenthesis matching mode, and a Goto ",
895 "Matching command. Automatic parenthesis matching is activated when you type, ",
896 "or move the insertion cursor after a parenthesis, bracket, or brace. It ",
897 "momentarily highlights either the opposite character ('Delimiter') or the ",
898 "entire expression ('Range') when the opposite character is visible in the ",
899 "window. To find a matching character anywhere in the file, select it or ",
900 "position the cursor after it, and choose Goto Matching from the Search menu. ",
901 "If the character matches itself, such as a quote or slash, select the first ",
902 "character of the pair. NEdit will match {, (, [, <, \", ', `, /, and \\. ",
903 "Holding the Shift key while typing the accelerator key (Shift+Ctrl+M, by ",
904 "default), will select all of the text between the matching characters. ",
906 "When syntax highlighting is enabled, the matching routines can optionally ",
907 "make use of the syntax information for improved accuracy. In that case, ",
908 "a brace inside a highlighted string will not match a brace inside a comment, ",
911 "\01ROpening Included Files\01I",
913 "The Open Selected command in the File menu understands the C preprocessor's ",
914 "#include syntax, so selecting an #include line and invoking Open Selected will ",
915 "generally find the file referred to, unless doing so depends on the settings of ",
916 "compiler switches or other information not available to NEdit. ",
918 "\01RInterface to Programming Tools\01I",
920 "Integrated software development environments such as SGI's CaseVision and ",
921 "Centerline Software's Code Center, can be interfaced directly with NEdit via ",
922 "the client server interface. These tools allow you to click directly on ",
923 "compiler and runtime error messages and request NEdit to open files, and select ",
924 "lines of interest. The easiest method is usually to use the tool's interface ",
925 "for character-based editors like vi, to invoke nc, but programmatic interfaces ",
926 "can also be derived using the source code for nc. ",
928 "There are also some simple compile/review, grep, ctree, and ctags browsers ",
929 "available in the NEdit contrib directory on ftp.nedit.org. ",
933 static char * htxt_tabs
[] = {
934 "\01RChanging the Tab Distance\01I",
936 "Tabs are important for programming in languages which use indentation to show ",
937 "nesting, as short-hand for producing white-space for leading indents. As a ",
938 "programmer, you have to decide how to use indentation, and how or whether tab ",
939 "characters map to your indentation scheme. ",
941 "Ideally, tab characters map directly to the amount of indent that you use to ",
942 "distinguish nesting levels in your code. Unfortunately, the Unix standard ",
943 "for interpretation of tab characters is eight characters (probably dating ",
944 "back to mechanical capabilities of the original teletype), which is usually ",
945 "too coarse for a single indent. ",
947 "Most text editors, NEdit included, allow you to change the interpretation of ",
948 "the tab character, and many programmers take advantage of this, and set their ",
949 "tabs to 3 or 4 characters to match their programming style. In NEdit you set ",
950 "the hardware tab distance in Preferences -> Tabs... for the current window, ",
951 "or Preferences -> Default Settings -> Tabs... (general), or Preferences -> ",
952 "Default Settings -> Language Modes... (language-specific) to change the ",
953 "defaults for future windows. ",
955 "Changing the meaning of the tab character makes programming much easier while ",
956 "you're in the editor, but can cause you headaches outside of the editor, ",
957 "because there is no way to pass along the tab setting as part of a plain-text ",
958 "file. All of the other tools which display, print, and otherwise process ",
959 "your source code have to be made aware of how the tabs are set, and must be ",
960 "able to handle the change. Non-standard tabs can also confuse other ",
961 "programmers, or make editing your code difficult for them if their text ",
962 "editors don't support changes in tab distance. ",
964 "\01REmulated Tabs\01I",
966 "An alternative to changing the interpretation of the tab character is tab ",
967 "emulation. In the Tabs... dialog(s), turning on Emulated Tabs causes the Tab ",
968 "key to insert the correct number of spaces and/or tabs to bring the cursor ",
969 "the next emulated tab stop, as if tabs were set at the emulated tab distance ",
970 "rather than the hardware tab distance. Backspacing immediately after entering ",
971 "an emulated tab will delete the fictitious tab as a unit, but as soon as you ",
972 "move the cursor away from the spot, NEdit will forget that the collection of ",
973 "spaces and tabs is a tab, and will treat it as separate characters. To enter ",
974 "a real tab character with \"Emulate Tabs\" turned on, use Ctrl+Tab. ",
976 "It is also possible to tell NEdit not to insert ANY tab characters at all in ",
977 "the course of processing emulated tabs, and in shifting and rectangular ",
978 "insertion/deletion operations, for programmers who worry about the ",
979 "misinterpretation of tab characters on other systems. ",
983 static char * htxt_indent
[] = {
984 "\01IProgrammers who use structured languages usually require some form of ",
985 "automatic indent, so that they don't have to continually re-type the ",
986 "sequences of tabs and/or spaces needed to maintain lengthy running indents. ",
987 "NEdit therefore offers \"smart\" indent, in addition to the traditional ",
988 "automatic indent which simply lines up the cursor position with the previous ",
991 "\01RSmart Indent\01I",
993 "Smart indent macros are only available by default for C and C++, and while ",
994 "these can easily be configured for different default indentation distances, ",
995 "they may not conform to everyone's exact C programming style. Smart indent ",
996 "is programmed in terms of macros in the NEdit macro language which can be ",
997 "entered in: Preferences -> Default Settings -> Indent -> Program Smart ",
998 "Indent. Hooks are provided for intervening at the point that a newline is ",
999 "entered, either via the user pressing the Enter key, or through ",
1000 "auto-wrapping; and for arbitrary type-in to act on specific characters typed. ",
1002 "To type a newline character without invoking smart-indent when operating in ",
1003 "smart-indent mode, hold the Shift key while pressing the Return or Enter key. ",
1005 "\01RAuto-Indent\01I",
1007 "With Indent set to Auto (the default), NEdit keeps a running indent. When ",
1008 "you press the Return or Enter key, spaces and tabs are inserted to line up ",
1009 "the insert point under the start of the previous line. ",
1011 "Regardless of indent-mode, Ctrl+Return always does the automatic indent; ",
1012 "Shift+Return always does a return without indent. ",
1014 "\01RBlock Indentation Adjustment\01I",
1016 "The Shift Left and Shift Right commands as well as rectangular dragging can ",
1017 "be used to adjust the indentation for several lines at once. To shift a ",
1018 "block of text one character to the right, select the text, then choose Shift ",
1019 "Right from the Edit menu. Note that the accelerator keys for these menu ",
1020 "items are Ctrl+9 and Ctrl+0, which correspond to the right and left ",
1021 "parenthesis on most keyboards. Remember them as adjusting the text in the ",
1022 "direction pointed to by the parenthesis character. Holding the Shift key ",
1023 "while selecting either Shift Left or Shift Right will shift the text by one ",
1024 "tab stop (or by one emulated tab stop if tab emulation is turned on). The ",
1025 "help section \"Shifting and Filling\" under \"Basic Operation\" has details. ",
1029 static char * htxt_syntax
[] = {
1030 "\01ISyntax Highlighting means using colors and fonts to help distinguish language ",
1031 "elements in programming languages and other types of structured files. ",
1032 "Programmers use syntax highlighting to understand code faster and better, and ",
1033 "to spot many kinds of syntax errors more quickly. ",
1035 "To use syntax highlighting in NEdit, select Highlight Syntax in the ",
1036 "Preferences menu. If NEdit recognizes the computer language that you are ",
1037 "using, and highlighting rules (patterns) are available for that language, it ",
1038 "will highlight your text, and maintain the highlighting, automatically, as ",
1041 "If NEdit doesn't correctly recognize the type of the file you are editing, ",
1042 "you can manually select a language mode from Language Modes in the ",
1043 "Preferences menu. You can also program the method that NEdit uses to ",
1044 "recognize language modes in Preferences -> Default Settings -> Language ",
1047 "If no highlighting patterns are available for the language that you want to ",
1048 "use, you can create new patterns relatively quickly. The Help section ",
1049 "\"\01QHighlighting Patterns\01I\" under \"Customizing\", has details. ",
1051 "If you are satisfied with what NEdit is highlighting, but would like it to ",
1052 "use different colors or fonts, you can change these by selecting Preferences ",
1053 "-> Default Settings -> Syntax Highlighting -> Text Drawing Styles. ",
1054 "Highlighting patterns are connected with font and color information through a ",
1055 "common set of styles so that colorings defined for one language will be ",
1056 "similar across others, and patterns within the same language which are meant ",
1057 "to appear identical can be changed in the same place. To understand which ",
1058 "styles are used to highlight the language you are interested in, you may need ",
1059 "to look at \"\01QHighlighting Patterns\01I\" section, as well. ",
1061 "Syntax highlighting is CPU intensive, and under some circumstances can affect ",
1062 "NEdit's responsiveness. If you have a particularly slow system, or work with ",
1063 "very large files, you may not want to use it all of the time. Syntax ",
1064 "highlighting introduces two kinds of delays. The first is an initial parsing ",
1065 "delay, proportional to the size of the file. This delay is also incurred ",
1066 "when pasting large sections of text, filtering text through shell commands, ",
1067 "and other circumstances involving changes to large amounts of text. The ",
1068 "second kind of delay happens when text which has not previously been visible ",
1069 "is scrolled in to view. Depending on your system, and the highlight patterns ",
1070 "you are using, this may or may not be noticeable. A typing delay is also ",
1071 "possible, but unlikely if you are only using the built-in patterns. ",
1075 static char * htxt_tags
[] = {
1076 "\01INEdit can process tags files generated using the Unix ctags command or the ",
1077 "Exuberant Ctags program. Ctags creates index files correlating names of ",
1078 "functions and declarations with their locations in C, Fortran, or Pascal source ",
1079 "code files. (See the ctags manual page for more information). Ctags produces a ",
1080 "file called \"tags\" which can be loaded by NEdit. NEdit can manage any number ",
1081 "of tags files simultaneously. Tag collisions are handled with a popup menu to ",
1082 "let the user decide which tag to use. In 'Smart' mode NEdit will automatically ",
1083 "choose the desired tag based on the scope of the file or module. Once loaded, ",
1084 "the information in the tags file enables NEdit to go directly to the ",
1085 "declaration of a highlighted function or data structure name with a single ",
1086 "command. To load a tags file, select \"Load Tags File\" from the File menu and ",
1087 "choose a tags file to load, or specify the name of the tags file on the NEdit ",
1090 "\01A nedit -tags tags\n",
1092 "NEdit can also be set to load a tags file automatically when it starts up. ",
1093 "Setting the X resource nedit.tagFile to the name of a tag file tells NEdit to ",
1094 "look for that file at startup time (see \"\01QCustomizing NEdit\01I\"). The file name ",
1095 "can be either a complete path name, in which case NEdit will always load the ",
1096 "same tags file, or a file name without a path or with a relative path, in ",
1097 "which case NEdit will load it starting from the current directory. The ",
1098 "second option allows you to have different tags files for different projects, ",
1099 "each automatically loaded depending on the directory you're in when you start ",
1100 "NEdit. Setting the name to \"tags\" is an obvious choice since this is the ",
1101 "name that ctags uses. NEdit normally evaluates relative path tag file ",
1102 "specifications every time a file is opened. All accessible tag files are ",
1103 "loaded at this time. To disable the automatic loading of tag files specified ",
1104 "as relative paths, set the X resource nedit.alwaysCheckRelativeTagsSpecs to ",
1107 "To unload a tags file, select \"Un-load Tags File\" from the File menu and ",
1108 "choose from the list of tags files. NEdit will keep track of tags file updates ",
1109 "by checking the timestamp on the files, and automatically update the tags ",
1112 "To find the definition of a function or data structure once a tags file is ",
1113 "loaded, select the name anywhere it appears in your program (see ",
1114 "\"\01QSelecting Text\01I\") and choose \"Find Definition\" from the Search menu. ",
1118 static char * htxt_calltips
[] = {
1119 "\01ICalltips are little yellow boxes that pop up to remind you what the arguments ",
1120 "and return type of a function are. More generally, they're a UI mechanism to ",
1121 "present a small amount of crucial information in a prominent location. To ",
1122 "display a calltip, select some text and choose \"Show Calltip\" from the Search ",
1123 "menu. To kill a displayed calltip, hit Esc. ",
1125 "Calltips get their information from one of two places -- either a tags file (see ",
1126 "\"\01QFinding Declarations (ctags)\01I\") or a calltips file. First, any loaded calltips ",
1127 "files are searched for a definition, and if nothing is found then the tags ",
1128 "database is searched. If a tag is found that matches the highlighted text then ",
1129 "a calltip is displayed with the first few lines of the definition -- usually ",
1130 "enough to show you what the arguments of a function are. ",
1132 "You can load a calltips file by using choosing \"Load Calltips File\" from the ",
1133 "File menu. You can unload a calltips file by selecting it from the ",
1134 "\"Unload Calltips File\" submenu of the File menu. You can also choose one or ",
1135 "more default calltips files to be loaded for each language mode using the ",
1136 "\"Default calltips file(s)\" field of the Language Modes dialog. ",
1138 "The calltips file format is very simple. calltips files are organized in blocks ",
1139 "separated by blank lines. The first line of the block is the key, which is the ",
1140 "word that is matched when a calltip is requested. The rest of the block is ",
1141 "displayed as the calltip. ",
1143 "Almost any text at all can appear in a calltip key or a calltip. There are no ",
1144 "special characters that need to be escaped. The only issues to note are that ",
1145 "trailing whitespace is ignored, and you cannot have a blank line inside a ",
1146 "calltip. (Use a single period instead -- it'll be nearly invisible.) You should ",
1147 "also avoid calltip keys that begin and end with '*' characters, since those are ",
1148 "used to mark special blocks. ",
1150 "There are five special block types--comment, include, language, alias, and ",
1151 "version--which are distinguished by their first lines, \"* comment *\", ",
1152 "\"* include *\", \"* language *\", \"* alias *\", and \"* version *\" respectively ",
1153 "(without quotes). ",
1155 "Comment blocks are ignored when reading calltips files. ",
1157 "Include blocks specify additional calltips files to load, one per line. The ~ ",
1158 "character can be used for your $HOME directory, but other shell shortcuts like ",
1159 "* and ? can't be used. Include blocks allow you to make a calltips file for your ",
1160 "project that includes, say, the calltips files for C, Motif, and Xt. ",
1162 "Language blocks specify which language mode the calltips should be used with. ",
1163 "When a calltip is requested it won't match tips from languages other than the ",
1164 "current language mode. Language blocks only affect the tips listed after the ",
1167 "Alias blocks allow a calltip to have multiple keys. The first line of the block ",
1168 "is the key for the calltip to be displayed, and the rest of the lines are ",
1169 "additional keys, one per line, that should also show the calltip. ",
1171 "Version blocks are ignored for the time being. ",
1173 "You can use calltips in your own macros using the calltip() and kill_calltip() ",
1174 "macro subroutines and the $calltip_ID macro variable. See the ",
1175 "\01QMacro Subroutines\01I section for details. ",
1179 static char * htxt_basicSyntax
[] = {
1180 "\01IRegular expressions (regex's) are useful as a way to match inexact sequences ",
1181 "of characters. They can be used in the `Find...' and `Replace...' search ",
1182 "dialogs and are at the core of Color Syntax Highlighting patterns. To specify ",
1183 "a regular expression in a search dialog, simply click on the `Regular ",
1184 "Expression' radio button in the dialog. ",
1186 "A regex is a specification of a pattern to be matched in the searched text. ",
1187 "This pattern consists of a sequence of tokens, each being able to match a ",
1188 "single character or a sequence of characters in the text, or assert that a ",
1189 "specific position within the text has been reached (the latter is called an ",
1190 "anchor.) Tokens (also called atoms) can be modified by adding one of a number ",
1191 "of special quantifier tokens immediately after the token. A quantifier token ",
1192 "specifies how many times the previous token must be matched (see below.) ",
1194 "Tokens can be grouped together using one of a number of grouping constructs, ",
1195 "the most common being plain parentheses. Tokens that are grouped in this way ",
1196 "are also collectively considered to be a regex atom, since this new larger ",
1197 "atom may also be modified by a quantifier. ",
1199 "A regex can also be organized into a list of alternatives by separating each ",
1200 "alternative with pipe characters, `|'. This is called alternation. A match ",
1201 "will be attempted for each alternative listed, in the order specified, until a ",
1202 "match results or the list of alternatives is exhausted (see \01QAlternation\01I ",
1205 "\01RThe 'Any' Character\01I",
1207 "If a dot (`.') appears in a regex, it means to match any character exactly ",
1208 "once. By default, dot will not match a newline character, but this behavior ",
1209 "can be changed (see help topic \01QParenthetical Constructs\01I, under the ",
1210 "heading, Matching Newlines). ",
1212 "\01RCharacter Classes\01I",
1214 "A character class, or range, matches exactly one character of text, but the ",
1215 "candidates for matching are limited to those specified by the class. Classes ",
1216 "come in two flavors as described below: ",
1218 "\01A [...] Regular class, match only characters listed.\n",
1219 " [^...] Negated class, match only characters NOT listed.\n",
1221 "As with the dot token, by default negated character classes do not match ",
1222 "newline, but can be made to do so. ",
1224 "The characters that are considered special within a class specification are ",
1225 "different than the rest of regex syntax as follows. If the first character in ",
1226 "a class is the `]' character (second character if the first character is `^') ",
1227 "it is a literal character and part of the class character set. This also ",
1228 "applies if the first or last character is `-'. Outside of these rules, two ",
1229 "characters separated by `-' form a character range which includes all the ",
1230 "characters between the two characters as well. For example, `[^f-j]' is the ",
1231 "same as `[^fghij]' and means to match any character that is not `f', `g', ",
1232 "`h', `i', or `j'. ",
1236 "Anchors are assertions that you are at a very specific position within the ",
1237 "search text. NEdit regular expressions support the following anchor tokens: ",
1239 "\01A ^ Beginning of line\n",
1241 " < Left word boundary\n",
1242 " > Right word boundary\n",
1243 " \\B Not a word boundary\n",
1245 "Note that the \\B token ensures that neither the left nor the right ",
1246 "character are delimiters, or that both left and right characters are ",
1247 "delimiters. The left word anchor checks whether the previous character ",
1248 "is a delimiter and the next character is not. The right word anchor ",
1249 "works in a similar way. ",
1251 "\01RQuantifiers\01I",
1253 "Quantifiers specify how many times the previous regular expression atom may ",
1254 "be matched in the search text. Some quantifiers can produce a large ",
1255 "performance penalty, and can in some instances completely lock up NEdit. To ",
1256 "prevent this, avoid nested quantifiers, especially those of the maximal ",
1257 "matching type (see below.) ",
1259 "The following quantifiers are maximal matching, or \"greedy\", in that they ",
1260 "match as much text as possible. ",
1262 "\01A * Match zero or more\n",
1263 " + Match one or more\n",
1264 " ? Match zero or one\n",
1266 "The following quantifiers are minimal matching, or \"lazy\", in that they match ",
1267 "as little text as possible. ",
1269 "\01A *? Match zero or more\n",
1270 " +? Match one or more\n",
1271 " ?? Match zero or one\n",
1273 "One final quantifier is the counting quantifier, or brace quantifier. It ",
1274 "takes the following basic form: ",
1276 "\01A {min,max} Match from `min' to `max' times the\n",
1277 " previous regular expression atom.\n",
1279 "If `min' is omitted, it is assumed to be zero. If `max' is omitted, it is ",
1280 "assumed to be infinity. Whether specified or assumed, `min' must be less ",
1281 "than or equal to `max'. Note that both `min' and `max' are limited to ",
1282 "65535. If both are omitted, then the construct is the same as `*'. Note ",
1283 "that `{,}' and `{}' are both valid brace constructs. A single number ",
1284 "appearing without a comma, e.g. `{3}' is short for the `{min,min}' construct, ",
1285 "or to match exactly `min' number of times. ",
1287 "The quantifiers `{1}' and `{1,1}' are accepted by the syntax, but are ",
1288 "optimized away since they mean to match exactly once, which is redundant ",
1289 "information. Also, for efficiency, certain combinations of `min' and `max' ",
1290 "are converted to either `*', `+', or `?' as follows: ",
1292 "\01A {} {,} {0,} *\n",
1296 "Note that {0} and {0,0} are meaningless and will generate an error message at ",
1297 "regular expression compile time. ",
1299 "Brace quantifiers can also be \"lazy\". For example {2,5}? would try to match ",
1300 "2 times if possible, and will only match 3, 4, or 5 times if that is what is ",
1301 "necessary to achieve an overall match. ",
1303 "\01RAlternation\01I",
1305 "A series of alternative patterns to match can be specified by separating them ",
1306 "with vertical pipes, `|'. An example of alternation would be `a|be|sea'. ",
1307 "This will match `a', or `be', or `sea'. Each alternative can be an ",
1308 "arbitrarily complex regular expression. The alternatives are attempted in ",
1309 "the order specified. An empty alternative can be specified if desired, e.g. ",
1310 "`a|b|'. Since an empty alternative can match nothingness (the empty string), ",
1311 "this guarantees that the expression will match. ",
1315 "Comments are of the form `(?#<comment text>)' and can be inserted anywhere ",
1316 "and have no effect on the execution of the regular expression. They can be ",
1317 "handy for documenting very complex regular expressions. Note that a comment ",
1318 "begins with `(?#' and ends at the first occurrence of an ending parenthesis, ",
1319 "or the end of the regular expression... period. Comments do not recognize ",
1320 "any escape sequences. ",
1324 static char * htxt_escapeSequences
[] = {
1325 "\01REscaping Metacharacters\01I",
1327 "In a regular expression (regex), most ordinary characters match themselves. ",
1328 "For example, `ab%' would match anywhere `a' followed by `b' followed by `%' ",
1329 "appeared in the text. Other characters don't match themselves, but are ",
1330 "metacharacters. For example, backslash is a special metacharacter which ",
1331 "'escapes' or changes the meaning of the character following it. Thus, to ",
1332 "match a literal backslash would require a regular expression to have two ",
1333 "backslashes in sequence. NEdit provides the following escape sequences so ",
1334 "that metacharacters that are used by the regex syntax can be specified as ",
1335 "ordinary characters. ",
1337 "\01A \\( \\) \\- \\[ \\] \\< \\> \\{ \\}\n",
1338 " \\. \\| \\^ \\$ \\* \\+ \\? \\& \\\\\n",
1340 "\01RSpecial Control Characters\01I",
1342 "There are some special characters that are difficult or impossible to type. ",
1343 "Many of these characters can be constructed as a sort of metacharacter or ",
1344 "sequence by preceding a literal character with a backslash. NEdit recognizes ",
1345 "the following special character sequences: ",
1347 "\01A \\a alert (bell)\n",
1349 " \\e ASCII escape character (***)\n",
1350 " \\f form feed (new page)\n",
1352 " \\r carriage return\n",
1353 " \\t horizontal tab\n",
1354 " \\v vertical tab\n",
1356 "\01A *** For environments that use the EBCDIC character set,\n",
1357 " when compiling NEdit set the EBCDIC_CHARSET compiler\n",
1358 " symbol to get the EBCDIC equivalent escape\n",
1361 "\01ROctal and Hex Escape Sequences\01I",
1363 "Any ASCII (or EBCDIC) character, except null, can be specified by using ",
1364 "either an octal escape or a hexadecimal escape, each beginning with \\0 or \\x ",
1365 "(or \\X), respectively. For example, \\052 and \\X2A both specify the `*' ",
1366 "character. Escapes for null (\\00 or \\x0) are not valid and will generate an ",
1367 "error message. Also, any escape that exceeds \\0377 or \\xFF will either cause ",
1368 "an error or have any additional character(s) interpreted literally. For ",
1369 "example, \\0777 will be interpreted as \\077 (a `?' character) followed by `7' ",
1370 "since \\0777 is greater than \\0377. ",
1372 "An invalid digit will also end an octal or hexadecimal escape. For example, ",
1373 "\\091 will cause an error since `9' is not within an octal escape's range of ",
1374 "allowable digits (0-7) and truncation before the `9' yields \\0 which is ",
1377 "\01RShortcut Escape Sequences\01I",
1379 "NEdit defines some escape sequences that are handy shortcuts for commonly ",
1380 "used character classes. ",
1382 "\01A \\d digits 0-9\n",
1383 " \\l letters a-z, A-Z, and locale dependent letters\n",
1384 " \\s whitespace \\t, \\r, \\v, \\f, and space\n",
1385 " \\w word characters letters, digits, and underscore, `_'\n",
1387 "\\D, \\L, \\S, and \\W are the same as the lowercase versions except that the ",
1388 "resulting character class is negated. For example, \\d is equivalent to ",
1389 "`[0-9]', while \\D is equivalent to `[^0-9]'. ",
1391 "These escape sequences can also be used within a character class. For ",
1392 "example, `[\\l_]' is the same as `[a-zA-Z_]', extended with possible locale ",
1393 "dependent letters. The escape sequences for special characters, and octal ",
1394 "and hexadecimal escapes are also valid within a class. ",
1396 "\01RWord Delimiter Tokens\01I",
1398 "Although not strictly a character class, the following escape sequences ",
1399 "behave similarly to character classes: ",
1401 "\01A \\y Word delimiter character\n",
1402 " \\Y Not a word delimiter character\n",
1404 "The `\\y' token matches any single character that is one of the characters ",
1405 "that NEdit recognizes as a word delimiter character, while the `\\Y' token ",
1406 "matches any character that is NOT a word delimiter character. Word delimiter ",
1407 "characters are dynamic in nature, meaning that the user can change them through ",
1408 "preference settings. For this reason, they must be handled differently by the ",
1409 "regular expression engine. As a consequence of this, `\\y' and `\\Y' can not be ",
1410 "used within a character class specification. ",
1414 static char * htxt_parenConstructs
[] = {
1415 "\01RCapturing Parentheses\01I",
1417 "Capturing Parentheses are of the form `(<regex>)' and can be used to group ",
1418 "arbitrarily complex regular expressions. Parentheses can be nested, but the ",
1419 "total number of parentheses, nested or otherwise, is limited to 50 pairs. ",
1420 "The text that is matched by the regular expression between a matched set of ",
1421 "parentheses is captured and available for text substitutions and ",
1422 "backreferences (see below.) Capturing parentheses carry a fairly high ",
1423 "overhead both in terms of memory used and execution speed, especially if ",
1424 "quantified by `*' or `+'. ",
1426 "\01RNon-Capturing Parentheses\01I",
1428 "Non-Capturing Parentheses are of the form `(?:<regex>)' and facilitate ",
1429 "grouping only and do not incur the overhead of normal capturing parentheses. ",
1430 "They should not be counted when determining numbers for capturing parentheses ",
1431 "which are used with backreferences and substitutions. Because of the limit ",
1432 "on the number of capturing parentheses allowed in a regex, it is advisable to ",
1433 "use non-capturing parentheses when possible. ",
1435 "\01RPositive Look-Ahead\01I",
1437 "Positive look-ahead constructs are of the form `(?=<regex>)' and implement a ",
1438 "zero width assertion of the enclosed regular expression. In other words, a ",
1439 "match of the regular expression contained in the positive look-ahead ",
1440 "construct is attempted. If it succeeds, control is passed to the next ",
1441 "regular expression atom, but the text that was consumed by the positive ",
1442 "look-ahead is first unmatched (backtracked) to the place in the text where ",
1443 "the positive look-ahead was first encountered. ",
1445 "One application of positive look-ahead is the manual implementation of a ",
1446 "first character discrimination optimization. You can include a positive ",
1447 "look-ahead that contains a character class which lists every character that ",
1448 "the following (potentially complex) regular expression could possibly start ",
1449 "with. This will quickly filter out match attempts that can not possibly ",
1452 "\01RNegative Look-Ahead\01I",
1454 "Negative look-ahead takes the form `(?!<regex>)' and is exactly the same as ",
1455 "positive look-ahead except that the enclosed regular expression must NOT ",
1456 "match. This can be particularly useful when you have an expression that is ",
1457 "general, and you want to exclude some special cases. Simply precede the ",
1458 "general expression with a negative look-ahead that covers the special cases ",
1459 "that need to be filtered out. ",
1461 "\01RPositive Look-Behind\01I",
1463 "Positive look-behind constructs are of the form `(?<=<regex>)' and implement ",
1464 "a zero width assertion of the enclosed regular expression in front of the ",
1465 "current matching position. It is similar to a positive look-ahead assertion, ",
1466 "except for the fact the the match is attempted on the text preceding the ",
1467 "current position, possibly even in front of the start of the matching range ",
1468 "of the entire regular expression. ",
1470 "A restriction on look-behind expressions is the fact that the expression ",
1471 "must match a string of a bounded size. In other words, `*', `+', and `{n,}' ",
1472 "quantifiers are not allowed inside the look-behind expression. Moreover, ",
1473 "matching performance is sensitive to the difference between the upper and ",
1474 "lower bound on the matching size. The smaller the difference, the better the ",
1475 "performance. This is especially important for regular expressions used in ",
1476 "highlight patterns. ",
1478 "Positive look-behind has similar applications as positive look-ahead. ",
1480 "\01RNegative Look-Behind\01I",
1482 "Negative look-behind takes the form `(?<!<regex>)' and is exactly the same as ",
1483 "positive look-behind except that the enclosed regular expression must ",
1484 "NOT match. The same restrictions apply. ",
1486 "Note however, that performance is even more sensitive to the distance ",
1487 "between the size boundaries: a negative look-behind must not match for ",
1488 "\01Jany\01I possible size, so the matching engine must check \01Jevery\01I size. ",
1490 "\01RCase Sensitivity\01I",
1492 "There are two parenthetical constructs that control case sensitivity: ",
1494 "\01A (?i<regex>) Case insensitive; `AbcD' and `aBCd' are\n",
1497 "\01A (?I<regex>) Case sensitive; `AbcD' and `aBCd' are\n",
1500 "Regular expressions are case sensitive by default, that is, `(?I<regex>)' is ",
1501 "assumed. All regular expression token types respond appropriately to case ",
1502 "insensitivity including character classes and backreferences. There is some ",
1503 "extra overhead involved when case insensitivity is in effect, but only to the ",
1504 "extent of converting each character compared to lower case. ",
1506 "\01RMatching Newlines\01I",
1508 "NEdit regular expressions by default handle the matching of newlines in a way ",
1509 "that should seem natural for most editing tasks. There are situations, ",
1510 "however, that require finer control over how newlines are matched by some ",
1511 "regular expression tokens. ",
1513 "By default, NEdit regular expressions will NOT match a newline character for ",
1514 "the following regex tokens: dot (`.'); a negated character class (`[^...]'); ",
1515 "and the following shortcuts for character classes: ",
1517 "\01A `\\d', `\\D', `\\l', `\\L', `\\s', `\\S', `\\w', `\\W', `\\Y'\n",
1519 "The matching of newlines can be controlled for the `.' token, negated ",
1520 "character classes, and the `\\s' and `\\S' shortcuts by using one of the ",
1521 "following parenthetical constructs: ",
1523 "\01A (?n<regex>) `.', `[^...]', `\\s', `\\S' match newlines\n",
1525 "\01A (?N<regex>) `.', `[^...]', `\\s', `\\S' don't match\n",
1528 "`(?N<regex>)' is the default behavior. ",
1530 "\01RNotes on New Parenthetical Constructs\01I",
1532 "Except for plain parentheses, none of the parenthetical constructs capture ",
1533 "text. If that is desired, the construct must be wrapped with capturing ",
1534 "parentheses, e.g. `((?i<regex))'. ",
1536 "All parenthetical constructs can be nested as deeply as desired, except for ",
1537 "capturing parentheses which have a limit of 50 sets of parentheses, ",
1538 "regardless of nesting level. ",
1540 "\01RBack References\01I",
1542 "Backreferences allow you to match text captured by a set of capturing ",
1543 "parenthesis at some later position in your regular expression. A ",
1544 "backreference is specified using a single backslash followed by a single ",
1545 "digit from 1 to 9 (example: \\3). Backreferences have similar syntax to ",
1546 "substitutions (see below), but are different from substitutions in that they ",
1547 "appear within the regular expression, not the substitution string. The number ",
1548 "specified with a backreference identifies which set of text capturing ",
1549 "parentheses the backreference is associated with. The text that was most ",
1550 "recently captured by these parentheses is used by the backreference to ",
1551 "attempt a match. As with substitutions, open parentheses are counted from ",
1552 "left to right beginning with 1. So the backreference `\\3' will try to match ",
1553 "another occurrence of the text most recently matched by the third set of ",
1554 "capturing parentheses. As an example, the regular expression `(\\d)\\1' could ",
1555 "match `22', `33', or `00', but wouldn't match `19' or `01'. ",
1557 "A backreference must be associated with a parenthetical expression that is ",
1558 "complete. The expression `(\\w(\\1))' contains an invalid backreference since ",
1559 "the first set of parentheses are not complete at the point where the ",
1560 "backreference appears. ",
1562 "\01RSubstitution\01I",
1564 "Substitution strings are used to replace text matched by a set of capturing ",
1565 "parentheses. The substitution string is mostly interpreted as ordinary text ",
1566 "except as follows. ",
1568 "The escape sequences described above for special characters, and octal and ",
1569 "hexadecimal escapes are treated the same way by a substitution string. When ",
1570 "the substitution string contains the `&' character, NEdit will substitute the ",
1571 "entire string that was matched by the `Find...' operation. Any of the first ",
1572 "nine sub-expressions of the match string can also be inserted into the ",
1573 "replacement string. This is done by inserting a `\\' followed by a digit from ",
1574 "1 to 9 that represents the string matched by a parenthesized expression ",
1575 "within the regular expression. These expressions are numbered left-to-right ",
1576 "in order of their opening parentheses. ",
1578 "The capitalization of text inserted by `&' or `\\1', `\\2', ... `\\9' can be ",
1579 "altered by preceding them with `\\U', `\\u', `\\L', or `\\l'. `\\u' and `\\l' ",
1580 "change only the first character of the inserted entity, while `\\U' and `\\L' ",
1581 "change the entire entity to upper or lower case, respectively. ",
1585 static char * htxt_advancedTopics
[] = {
1586 "\01RSubstitutions\01I",
1588 "Regular expression substitution can be used to program automatic editing ",
1589 "operations. For example, the following are search and replace strings to find ",
1590 "occurrences of the `C' language subroutine `get_x', reverse the first and ",
1591 "second parameters, add a third parameter of NULL, and change the name to ",
1594 "\01A Search string: `get_x *\\( *([^ ,]*), *([^\\)]*)\\)'\n",
1595 " Replace string: `new_get_x(\\2, \\1, NULL)'\n",
1597 "\01RAmbiguity\01I",
1599 "If a regular expression could match two different parts of the text, it will ",
1600 "match the one which begins earliest. If both begin in the same place but ",
1601 "match different lengths, or match the same length in different ways, life ",
1602 "gets messier, as follows. ",
1604 "In general, the possibilities in a list of alternatives are considered in ",
1605 "left-to-right order. The possibilities for `*', `+', and `?' are considered ",
1606 "longest-first, nested constructs are considered from the outermost in, and ",
1607 "concatenated constructs are considered leftmost-first. The match that will be ",
1608 "chosen is the one that uses the earliest possibility in the first choice that ",
1609 "has to be made. If there is more than one choice, the next will be made in ",
1610 "the same manner (earliest possibility) subject to the decision on the first ",
1611 "choice. And so forth. ",
1613 "For example, `(ab|a)b*c' could match `abc' in one of two ways. The first ",
1614 "choice is between `ab' and `a'; since `ab' is earlier, and does lead to a ",
1615 "successful overall match, it is chosen. Since the `b' is already spoken for, ",
1616 "the `b*' must match its last possibility, the empty string, since it must ",
1617 "respect the earlier choice. ",
1619 "In the particular case where no `|'s are present and there is only one `*', ",
1620 "`+', or `?', the net effect is that the longest possible match will be ",
1621 "chosen. So `ab*', presented with `xabbbby', will match `abbbb'. Note that ",
1622 "if `ab*' is tried against `xabyabbbz', it will match `ab' just after `x', due ",
1623 "to the begins-earliest rule. (In effect, the decision on where to start the ",
1624 "match is the first choice to be made, hence subsequent choices must respect ",
1625 "it even if this leads them to less-preferred alternatives.) ",
1627 "\01RReferences\01I",
1629 "An excellent book on the care and feeding of regular expressions is ",
1631 "\01A Mastering Regular Expressions, 2nd Edition\n",
1632 " Jeffrey E. F. Friedl\n",
1633 " 2002, O'Reilly & Associates\n",
1634 " ISBN 0-596-00289-0\n",
1638 static char * htxt_examples
[] = {
1639 "\01IThe following are regular expression examples which will match: ",
1641 " * An entire line.\n",
1644 " * Blank lines.\n",
1647 " * Whitespace on a line.\n",
1650 " * Whitespace across lines.\n",
1653 " * Whitespace that spans at least two lines. Note minimal matching `*?' quantifier.\n",
1654 "\01A (?n\\s*?\\n\\s*)\n",
1656 " * IP address (not robust).\n",
1657 "\01A (?:\\d{1,3}(?:\\.\\d{1,3}){3})\n",
1659 " * Two character US Postal state abbreviations (includes territories).\n",
1660 "\01A [ACDF-IK-PR-W][A-Z]\n",
1662 " * Web addresses.\n",
1663 "\01A (?:http://)?www\\.\\S+\n",
1665 " * Case insensitive double words across line breaks.\n",
1666 "\01A (?i(?n<(\\S+)\\s+\\1>))\n",
1668 " * Upper case words with possible punctuation.\n",
1669 "\01A <[A-Z][^a-z\\s]*>\n",
1674 static char * htxt_shell
[] = {
1675 "\01IThe Shell menu (Unix versions only) allows you to execute Unix shell commands ",
1676 "from within NEdit. You can add items to the menu to extend NEdit's command ",
1677 "set or to incorporate custom automatic editing features using shell commands ",
1678 "or editing languages like awk and sed. To add items to the menu, select ",
1679 "Preferences -> Default Settings Customize Menus -> Shell Menu. NEdit comes ",
1680 "pre-configured with a few useful Unix commands like spell and sort, but we ",
1681 "encourage you to add your own custom extensions. ",
1683 "Filter Selection... prompts you for a Unix command to use to process the ",
1684 "currently selected text. The output from this command replaces the contents ",
1685 "of the selection. ",
1687 "Execute Command... prompts you for a Unix command and replaces the current ",
1688 "selection with the output of the command. If there is no selection, it ",
1689 "deposits the output at the current insertion point. In the Shell Command ",
1690 "field, the % character expands to the name (including directory path), and ",
1691 "the # character expands to the current line number of the file in the window. ",
1692 "To include a % or # character in the command, use %% or ##, respectively. ",
1694 "Execute Command Line uses the position of the cursor in the window to ",
1695 "indicate a line to execute as a shell command line. The cursor may be ",
1696 "positioned anywhere on the line. This command allows you to use an NEdit ",
1697 "window as an editable command window for saving output and saving commands ",
1698 "for re-execution. Note that the same character expansions described above ",
1699 "in Execute Command also occur with this command. ",
1701 "The X resource called nedit.shell (See \"\01QCustomizing NEdit\01I\") determines which ",
1702 "Unix shell is used to execute commands. The default value for this resource ",
1707 static char * htxt_learn
[] = {
1708 "\01ISelecting Learn Keystrokes from the Macro menu puts NEdit in learn mode. In ",
1709 "learn mode, keystrokes and menu commands are recorded, to be played back ",
1710 "later, using the Replay Keystrokes command, or pasted into a macro in the ",
1711 "Macro Commands dialog of the Default Settings menu in Preferences. ",
1713 "Note that only keyboard and menu commands are recorded, not mouse clicks or ",
1714 "mouse movements since these have no absolute point of reference, such as ",
1715 "cursor or selection position. When you do a mouse-based operation in learn ",
1716 "mode, NEdit will beep (repeatedly) to remind you that the operation was not ",
1719 "Learn mode is also the quickest and easiest method for writing macros. The ",
1720 "dialog for creating macro commands contains a button labeled \"Paste Learn / ",
1721 "Replay Macro\", which will deposit the last sequence learned into the body of ",
1724 "\01RRepeating Actions and Learn/Replay Sequences\01I",
1726 "You can repeat the last (keyboard-based) command, or learn/replay sequence ",
1727 "with the Repeat... command in the Macro menu. To repeat an action, first do ",
1728 "the action (that is, insert a character, do a search, move the cursor), then ",
1729 "select Repeat..., decide how or how many times you want it repeated, and ",
1730 "click OK. For example, to move down 30 lines through a file, you could type: ",
1731 "<Down Arrow> Ctrl+, 29 <Return>. To repeat a learn/replay sequence, first ",
1732 "learn it, then select Repeat..., click on Learn/Replay and how you want it ",
1733 "repeated, then click OK. ",
1735 "If the commands you are repeating advance the cursor through the file, you ",
1736 "can also repeat them within a range of characters, or from the current cursor ",
1737 "position to the end of the file. To iterate over a range of characters, use ",
1738 "the primary selection (drag the left mouse button over the text) to mark the ",
1739 "range you want to operate on, and select \"In Selection\" in the Repeat dialog. ",
1741 "When using In \"Selection\" or \"To End\" with a learned sequence, try to do ",
1742 "cursor movement as the last step in the sequence, since testing of the cursor ",
1743 "position is only done at the end of the sequence execution. If you do cursor ",
1744 "movement first, for example searching for a particular word then doing a ",
1745 "modification, the position of the cursor won't be checked until the sequence ",
1746 "has potentially gone far beyond the end of your desired range. ",
1748 "It's easy for a repeated command to get out of hand, and you can easily ",
1749 "generate an infinite loop by using range iteration on a command which doesn't ",
1750 "progress. To cancel a repeating command in progress, type Ctrl+. (period), ",
1751 "or select Cancel Macro from the Macro menu. ",
1755 static char * htxt_macro_lang
[] = {
1756 "\01IMacros can be called from Macro menu commands, window background menu ",
1757 "commands, within the smart-indent framework, from the autoload macro file and ",
1758 "from the command line. ",
1759 "Macro menu and window background menu commands are defined under Preferences ",
1760 "-> Default Settings -> Customize Menus. Help on creating items in these ",
1761 "menus can be found in the section, Help -> Customizing -> Preferences. ",
1763 "The autoload macro file is a file of macro commands and definitions which ",
1764 "NEdit will automatically execute when it is first started. Its location is ",
1765 "dependent on your environment: ",
1767 " * The default place for the file is '$HOME/.nedit/autoload.nm',\n",
1768 " * if the variable $NEDIT_HOME is set in your environment it is located at '$NEDIT_HOME/autoload.nm',\n",
1769 " * if you are using old-style run control files (i.e. $HOME/.nedit is a regular file) it is located in '$HOME/.neditmacro'.\n",
1771 "(For VMS, the file is in '$NEDIT_HOME/autoload.nm' if $NEDIT_HOME is set, in ",
1772 "'SYS$LOGIN:.neditmacro' otherwise.) ",
1774 "NEdit's macro language is a simple interpreter with integer arithmetic, ",
1775 "dynamic strings, and C-style looping constructs (very similar to the ",
1776 "procedural portion of the Unix awk program). From the macro language, you ",
1777 "can call the same action routines which are bound to keyboard keys and menu ",
1778 "items, as well additional subroutines for accessing and manipulating editor ",
1779 "data, which are specific to the macro language (these are listed in the ",
1780 "sections titled \"\01QMacro Subroutines\01I\", and \"\01QAction Routines\01I\"). ",
1784 "An NEdit macro language program consists of a list of statements, each ",
1785 "terminated by a newline. Groups of statements which are executed together ",
1786 "conditionally, such as the body of a loop, are surrounded by curly braces ",
1789 "Blank lines and comments are also allowed. Comments begin with a \"#\" and end ",
1790 "with a newline, and can appear either on a line by themselves, or at the end ",
1793 "Statements which are too long to fit on a single line may be split across ",
1794 "several lines, by placing a backslash \"\\\" character at the end of each line ",
1795 "to be continued. ",
1797 "\01RData Types\01I",
1799 "The NEdit macro language recognizes only three data types, dynamic character ",
1800 "strings, integer values and associative arrays. In general strings and ",
1801 "integers can be used interchangeably. If a string represents an integer ",
1802 "value, it can be used as an integer. Integers can be compared and ",
1803 "concatenated with strings. Arrays may contain integers, strings, or arrays. ",
1804 "Arrays are stored key/value pairs. Keys are always stored as strings. ",
1806 "\01SInteger Constants\01I",
1808 "Integers are non-fractional numbers in the range of -2147483647 to ",
1809 "2147483647. Integer constants must be in decimal. For example: ",
1814 "\01SCharacter String Constants\01I",
1816 "Character string constants are enclosed in double quotes. For example: ",
1818 "\01A a = \"a string\"\n",
1819 " dialog(\"Hi there!\", \"OK\")\n",
1821 "Strings may also include C-language style escape sequences: ",
1823 "\01A \\\\ Backslash \\t Tab \\f Form feed\n",
1824 " \\\" Double quote \\b Backspace \\a Alert\n",
1825 " \\n Newline \\r Carriage return \\v Vertical tab\n",
1827 "For example, to send output to the terminal from which NEdit was started, a ",
1828 "newline character is necessary because, like printf, t_print requires ",
1829 "explicit newlines, and also buffers its output on a per-line basis: ",
1831 "\01A t_print(\"a = \" a \"\\n\")\n",
1833 "\01RVariables\01I",
1835 "Variable names must begin either with a letter (local variables), or a $ ",
1836 "(global variables). Beyond the first character, variables may also contain ",
1837 "numbers and underscores `_'. Variables are called in to existence just by ",
1838 "setting them (no explicit declarations are necessary). ",
1840 "Local variables are limited in scope to the subroutine (or menu item ",
1841 "definition) in which they appear. Global variables are accessible from all ",
1842 "routines, and their values persist beyond the call which created them, until ",
1845 "\01SBuilt-in Variables\01I",
1847 "NEdit has a number of permanently defined variables, which are used to access ",
1848 "global editor information and information about the the window in which the ",
1849 "macro is executing. These are listed along with the built in functions in ",
1850 "the section titled \"\01QMacro Subroutines\01I\". ",
1852 "\01RFunctions and Subroutines\01I",
1854 "The syntax of a function or subroutine call is: ",
1856 "\01A function_name(arg1, arg2, ...)\n",
1858 "where arg1, arg2, etc. represent the argument values which are passed to ",
1859 "the routine being called. A function or subroutine call can be on a line by ",
1860 "itself, as above, or if it returns a value, can be invoked within a character ",
1861 "or numeric expression: ",
1863 "\01A a = fn1(b, c) + fn2(d)\n",
1864 " dialog(\"fn3 says: \" fn3())\n",
1866 "Arguments are passed by value. This means that you can not return values via ",
1867 "the argument list, only through the function value or indirectly through ",
1868 "agreed-upon global variables. ",
1870 "\01SBuilt-in Functions\01I",
1872 "NEdit has a wide range of built in functions which can be called from the ",
1873 "macro language. These routines are divided into two classes, macro-language ",
1874 "functions, and editor action routines. Editor action routines are more ",
1875 "flexible, in that they may be called either from the macro language, or bound ",
1876 "directly to keys via translation tables. They are also limited, however, in ",
1877 "that they can not return values. Macro language routines can return values, ",
1878 "but can not be bound to keys in translation tables. ",
1880 "Nearly all of the built-in subroutines operate on an implied window, which is ",
1881 "initially the window from which the macro was started. To manipulate the ",
1882 "contents of other windows, use the focus_window subroutine to change the ",
1883 "focus to the ones you wish to modify. focus_window can also be used to ",
1884 "iterate over all of the currently open windows, using the special keyword ",
1885 "names, \"last\" and \"next\". ",
1887 "For backwards compatibility, hyphenated action routine names are allowed, and ",
1888 "most of the existing action routines names which contain underscores have an ",
1889 "equivalent version containing hyphens ('-') instead of underscores. Use of ",
1890 "these names is discouraged. The macro parser resolves the ambiguity between ",
1891 "'-' as the subtraction/negation operator, and - as part of an action routine ",
1892 "name by assuming subtraction unless the symbol specifically matches an action ",
1895 "\01SUser Defined Functions\01I",
1897 "Users can define their own macro subroutines, using the define keyword: ",
1899 "\01A define subroutine_name {\n",
1900 " < body of subroutine >\n",
1903 "Macro definitions can not appear within other definitions, or within macro ",
1904 "menu item definitions (usually they are found in the autoload macro file). ",
1906 "The arguments with which a user-defined subroutine or function was invoked, ",
1907 "are presented as $1, $2, ... , $9 or $args[expr], where expr can be evaluated ",
1908 "to an integer from 1 to the number of arguments. The number of arguments can ",
1909 "be read from $n_args or $args[]. The array $args[expr] is the only way to ",
1910 "access arguments beyond the first 9. ",
1912 "To return a value from a subroutine, and/or to exit from the subroutine ",
1913 "before the end of the subroutine body, use the return statement: ",
1915 "\01A return <value to return>\n",
1917 "\01ROperators and Expressions\01I",
1919 "Operators have the same meaning and precedence that they do in C, except for ",
1920 "^, which raises a number to a power (y^x means y to the x power), rather than ",
1921 "bitwise exclusive OR. The table below lists operators in decreasing order of ",
1924 "\01A Operators Associativity\n",
1926 " ^ right to left\n",
1927 " - ! ++ -- (unary)\n",
1928 " * / % left to right\n",
1929 " + - left to right\n",
1930 " > >= < <= == != left to right\n",
1931 " & left to right\n",
1932 " | left to right\n",
1933 " && left to right\n",
1934 " || left to right\n",
1935 " (concatenation) left to right\n",
1936 " = += -= *= /= %=, &= |= right to left\n",
1938 "The order in which operands are evaluated in an expression is undefined, ",
1939 "except for && and ||, which like C, evaluate operands left to right, but stop ",
1940 "when further evaluation would no longer change the result. ",
1942 "\01SNumerical Operators\01I",
1944 "The numeric operators supported by the NEdit macro language are listed below: ",
1946 "\01A + addition\n",
1947 " - subtraction or negation\n",
1948 " * multiplication\n",
1955 "Increment (++) and decrement (--) operators can also be appended or prepended ",
1956 "to variables within an expression. Prepended increment/decrement operators ",
1957 "act before the variable is evaluated. Appended increment/decrement operators ",
1958 "act after the variable is evaluated. ",
1960 "\01SLogical and Comparison Operators\01I",
1962 "Logical operations produce a result of 0 (for false) or 1 (for true). In a ",
1963 "logical operation, any non-zero value is recognized to mean true. The ",
1964 "logical and comparison operators allowed in the NEdit macro language are ",
1967 "\01A && logical and\n",
1972 " >= greater or equal\n",
1973 " <= less or equal\n",
1974 " == equal (integers and/or strings)\n",
1975 " != not equal (integers and/or strings)\n",
1977 "\01SCharacter String Operators\01I",
1979 "The \"operator\" for concatenating two strings is the absence of an operator. ",
1980 "Adjoining character strings with no operator in between means concatenation: ",
1982 "\01A d = a b \"string\" c\n",
1983 " t_print(\"the value of a is: \" a)\n",
1985 "Comparison between character strings is done with the == and != operators, ",
1986 "(as with integers). There are a number of useful built-in routines for ",
1987 "working with character strings, which are listed in the section called ",
1988 "\"\01QMacro Subroutines\01I\". ",
1990 "\01SArrays and Array Operators\01I",
1992 "Arrays may contain either strings, integers, or other arrays. Arrays are ",
1993 "associative, which means that they relate two pieces of information, the key ",
1994 "and the value. The key is always a string; if you use an integer it is ",
1995 "converted to a string. ",
1997 "To determine if a given key is in an array, use the 'in' keyword. ",
1999 "\01A if (\"6\" in x)\n",
2002 "If the left side of the in keyword is an array, the result is true if every ",
2003 "key in the left array is in the right array. Array values are not compared. ",
2005 "To iterate through all the keys of an array use the 'for' looping construct. ",
2006 "Keys are not guaranteed in any particular order: ",
2008 "\01A for (aKey in x)\n",
2011 "Elements can be removed from an array using the delete command: ",
2013 "\01A delete x[3] # deletes element with key 3\n",
2014 " delete x[] # deletes all elements\n",
2016 "The number of elements in an array can be determined by referencing the ",
2017 "array with no indices: ",
2019 "\01A dialog(\"array x has \" x[] \" elements\", \"OK\")\n",
2021 "Arrays can be combined with some operators. All the following operators only ",
2022 "compare the keys of the arrays. ",
2024 "\01A result = x + y (Merge arrays)\n",
2026 "The 'result' is a new array containing keys from both x and y. If ",
2027 "duplicates are present values from y are used. ",
2029 "\01A result = x - y (Remove keys)\n",
2031 "The 'result' is a new array containing all keys from x that are not in y. ",
2033 "\01A result = x & y (Common keys)\n",
2035 "The 'result' is a new array containing all keys which are in both x and y. ",
2036 "The values from y are used. ",
2038 "\01A result = x | y (Unique keys)\n",
2040 "The 'result' is a new array containing keys which exist in either x or y, ",
2043 "When duplicate keys are encountered using the + and & operators, the values ",
2044 "from the array on the right side of the operators are used for the result. ",
2045 "All of the above operators are array only, meaning both the left and right ",
2046 "sides of the operator must be arrays. The results are also arrays. ",
2048 "Array keys can also contain multiple dimensions: ",
2050 "\01A x[1, 1, 1] = \"string\"\n",
2052 "These are used in the expected way, e.g.: ",
2054 "\01A for (i = 1; i < 3; i++)\n",
2056 " for (j = 1; j < 3; j++)\n",
2062 "gives the following array: ",
2064 "\01A x[1, 1] = 0\n",
2069 "Internally all indices are part of one string, separated by the string ",
2070 "$sub_sep (ASCII 0x1c, 'FS'). The first key in the above example is in ",
2073 "\01A [\"1\" $sub_sep \"1\"]\n",
2075 "If you need to extract one of the keys, you can use split(), using ",
2076 "$sub_sep as the separator. ",
2078 "You can also check for the existence of multi-dimensional array by ",
2079 "looking for $sub_sep in the key. ",
2081 "Last, you need $sub_sep if you want to use the 'in' keyword. ",
2083 "\01A if ((1,2) in myArray)\n",
2086 "doesn't work, but ",
2088 "\01A if ((\"1\" $sub_sep \"2\") in myArray)\n",
2093 "\01RLooping and Conditionals\01I",
2095 "NEdit supports looping constructs: for and while, and conditional statements: ",
2096 "if and else, with essentially the same syntax as C: ",
2098 "\01A for (<init>, ...; <condition>; <increment>, ...) <body>\n",
2100 "\01A while (<condition>) <body>\n",
2102 "\01A if (<condition>) <body>\n",
2104 "\01A if (<condition>) <body> else <body>\n",
2106 "<body>, as in C, can be a single statement, or a list of statements enclosed ",
2107 "in curly braces ({}). <condition> is an expression which must evaluate to ",
2108 "true for the statements in <body> to be executed. for loops may also contain ",
2109 "initialization statements, <init>, executed once at the beginning of the ",
2110 "loop, and increment/decrement statements (or any arbitrary statement), which ",
2111 "are executed at the end of the loop, before the condition is evaluated again. ",
2115 "\01A for (i=0; i<100; i++)\n",
2118 "\01A for (i=0, j=20; i<20; i++, j--) {\n",
2120 " t_print(i, j, k)\n",
2123 "\01A while (k > 0)\n",
2129 "\01A for (;;) {\n",
2134 "Loops may contain break and continue statements. A break statement causes an ",
2135 "exit from the innermost loop, a continue statement transfers control to the ",
2136 "end of the loop. ",
2140 static char * htxt_macro_subrs
[] = {
2141 "\01RBuilt in Variables\01I",
2143 "These variables are read-only and can not be changed. ",
2145 "\01A\01B$1\01A, \01B$2\01A, \01B$3\01A, \01B$4\01A, \01B$5\01A, \01B$6\01A, \01B$7\01A, \01B$8\01A, \01B$9\01A\n",
2146 "\01B$args\01A[\01Cexpr\01A]\n",
2147 "\01B$n_args\01A\n",
2148 "\01IArgument information. The first 9 arguments (if there are that many) can ",
2149 "be referenced as read-only values using the shorthand form. All arguments ",
2150 "can be accessed as values in the \01J$args\01I array, using a numeric index ",
2151 "starting at 1. The total number of arguments received by a function is ",
2152 "given by \01J$n_args\01I or \01J$args[]\01I. ",
2154 "\01A\01B$active_pane\01A\n",
2155 "\01IIndex of the current pane. ",
2157 "\01A\01B$auto_indent\01A\n",
2158 "\01IContains the current preference for auto indent. ",
2159 "Can be \"off\", \"on\" or \"auto\". ",
2161 "\01A\01B$calltip_ID\01A\n",
2162 "\01IEquals the ID of the currently displayed calltip, or 0 if no calltip is ",
2163 "being displayed. ",
2165 "\01A\01B$cursor\01A\n",
2166 "\01IPosition of the cursor in the current window. ",
2168 "\01A\01B$column\01A\n",
2169 "\01IColumn number of the cursor position in the current window. ",
2171 "\01A\01B$display_width\01A\n",
2172 "\01IWidth of the current pane in pixels. ",
2174 "\01A\01B$em_tab_dist\01A\n",
2175 "\01IIf tab emulation is turned on in the Tabs... ",
2176 "dialog of the Preferences menu, value is the ",
2177 "distance between emulated tab stops. If tab ",
2178 "emulation is turned off, value is -1. ",
2180 "\01A\01B$empty_array\01A\n",
2181 "\01IAn array with no elements. This can be used to initialize ",
2182 "an array to an empty state. ",
2184 "\01A\01B$file_format\01A\n",
2185 "\01ICurrent newline format that the file will be saved with. Can ",
2186 "be \"unix\", \"dos\" or \"macintosh\". ",
2188 "\01A\01B$file_name\01A\n",
2189 "\01IName of the file being edited in the current ",
2190 "window, stripped of directory component. ",
2192 "\01A\01B$file_path\01A\n",
2193 "\01IDirectory component of file being edited in the current window. ",
2195 "\01A\01B$font_name\01A\n",
2196 "\01IContains the current plain text font name. ",
2198 "\01A\01B$font_name_bold\01A\n",
2199 "\01IContains the current bold text font name. ",
2201 "\01A\01B$font_name_bold_italic\01A\n",
2202 "\01IContains the current bold-italic text font name. ",
2204 "\01A\01B$font_name_italic\01A\n",
2205 "\01IContains the current italic text font name. ",
2207 "\01A\01B$highlight_syntax\01A\n",
2208 "\01IWhether syntax highlighting is turned on. ",
2210 "\01A\01B$incremental_backup\01A\n",
2211 "\01IContains 1 if incremental auto saving is on, otherwise 0. ",
2213 "\01A\01B$incremental_search_line\01A\n",
2214 "\01IHas a value of 1 if the preference is ",
2215 "selected to always show the incremental search line, otherwise 0. ",
2217 "\01A\01B$language_mode\01A\n",
2218 "\01IName of language mode set in the current window. ",
2220 "\01A\01B$line\01A\n",
2221 "\01ILine number of the cursor position in the current window. ",
2223 "\01A\01B$locked\01A\n",
2224 "\01ITrue if the file has been locked by the user. ",
2226 "\01A\01B$make_backup_copy\01A\n",
2227 "\01IHas a value of 1 if original file is kept in a ",
2228 "backup file on save, otherwise 0. ",
2230 "\01A\01B$max_font_width\01A\n",
2231 "\01IThe maximum font width of all the active styles. ",
2232 "Syntax highlighting styles are only considered if syntax highlighting ",
2235 "\01A\01B$min_font_width\01A\n",
2236 "\01IThe minimum font width of all the active styles. ",
2237 "Syntax highlighting styles are only considered if syntax highlighting ",
2240 "\01A\01B$modified\01A\n",
2241 "\01ITrue if the file in the current window has ",
2242 "been modified and the modifications have not ",
2245 "\01A\01B$n_display_lines\01A\n",
2246 "\01IThe number of lines visible in the currently active pane. ",
2248 "\01A\01B$n_panes\01A\n",
2249 "\01IThe number of panes in the current window. ",
2251 "\01A\01B$overtype_mode\01A\n",
2252 "\01ITrue if in Overtype mode. ",
2254 "\01A\01B$read_only\01A\n",
2255 "\01ITrue if the file is read only. ",
2257 "\01A\01B$selection_start, $selection_end\01A \n",
2258 "\01IBeginning and ending positions of the ",
2259 "primary selection in the current window, or ",
2260 "-1 if there is no text selected in the current window. ",
2262 "\01A\01B$selection_left, $selection_right\01A \n",
2263 "\01ILeft and right character offsets of the rectangular (primary) selection in ",
2264 "the current window, or -1 if there is no selection or it is not rectangular. ",
2266 "\01A\01B$server_name\01A\n",
2267 "\01IName of the current NEdit server. ",
2269 "\01A\01B$show_line_numbers\01A\n",
2270 "\01IWhether line numbers are shown next to the text. ",
2272 "\01A\01B$show_matching\01A\n",
2273 "\01IContains the current preference for showing matching pairs, ",
2274 "such as \"[]\" and \"{}\" pairs. Can be \"off\", \"delimiter\", or \"range\". ",
2276 "\01A\01B$match_syntax_based\01A\n",
2277 "\01IWhether pair matching should use syntax information, if available. ",
2279 "\01A\01B$statistics_line\01A\n",
2280 "\01IHas a value of 1 if the statistics line is shown, otherwise 0. ",
2282 "\01A\01B$sub_sep\01A\n",
2283 "\01IContains the value of the array sub-script separation string. ",
2285 "\01A\01B$tab_dist\01A\n",
2286 "\01IThe distance between tab stops for a ",
2287 "hardware tab character, as set in the ",
2288 "Tabs... dialog of the Preferences menu. ",
2290 "\01A\01B$text_length\01A\n",
2291 "\01IThe length of the text in the current window. ",
2293 "\01A\01B$top_line\01A\n",
2294 "\01IThe line number of the top line of the currently active pane. ",
2296 "\01A\01B$use_tabs\01A\n",
2297 "\01IWhether the user is allowing the NEdit to insert tab characters to maintain ",
2298 "spacing in tab emulation and rectangular dragging operations. (The setting of ",
2299 "the \"Use tab characters in padding and emulated tabs\" button in the Tabs... ",
2300 "dialog of the Preferences menu.) ",
2302 "\01A\01B$wrap_margin\01A\n",
2303 "\01IThe right margin in the current window for text wrapping and filling. ",
2305 "\01A\01B$wrap_text\01A\n",
2306 "\01IThe current wrap text mode. Values are \"none\", \"auto\" or \"continuous\". ",
2308 "\01RBuilt-in Subroutines\01I",
2310 "\01A\01Bappend_file( string, filename )\01A\n",
2311 "\01IAppends a string to a named file. Returns 1 on successful write, or 0 if ",
2314 "\01A\01Bbeep()\01A\n",
2315 "\01IRing the bell. ",
2317 "\01A\01Bcalltip( \"text_or_key\" [, pos [, mode or position_modifier, ...]] )\01A\n",
2318 "\01IPops up a calltip. <pos> is an optional position in the buffer where the tip ",
2319 "will be displayed. Passing -1 for <pos> is equivalent to not specifying a ",
2320 "position, and it guarantees that the tip will appear on-screen somewhere even ",
2321 "if the cursor is not. The upper-left corner of the calltip will appear below ",
2322 "where the cursor would appear if it were at this position. <mode> is one of ",
2323 "\"tipText\" (default), \"tipKey\", or \"tagKey\". \"tipText\" displays the text as-is, ",
2324 "\"tagKey\" uses it as the key to look up a tag, then converts the tag to a ",
2325 "calltip, and \"tipKey\" uses it as the key to look up a calltip, then falls back ",
2326 "to \"tagKey\" behavior if that fails. You'll usually use \"tipKey\" or \"tipText\". ",
2327 "Finally, you can modify the placement of the calltip relative to the cursor ",
2328 "position (or <pos>) with one or more of these optional position modifiers: ",
2329 "\"center\" aligns the center of the calltip with the position. \"right\" aligns ",
2330 "the right edge of the calltip with the position. (\"center\" and \"right\" may ",
2331 "not both be used.) \"above\" places the calltip above the position. \"strict\" ",
2332 "does not allow the calltip to move from its position in order to avoid going ",
2333 "off-screen or obscuring the cursor. Returns the ID of the calltip if it was ",
2334 "found and/or displayed correctly, 0 otherwise. ",
2336 "\01A\01Bclipboard_to_string()\01A \n",
2337 "\01IReturns the contents of the clipboard as a macro string. Returns empty ",
2338 "string on error. ",
2340 "\01A\01Bdialog( message, btn_1_label, btn_2_label, ... )\01A \n",
2341 "\01IPop up a dialog for querying and presenting information to the user. First ",
2342 "argument is a string to show in the message area of the dialog. ",
2343 "Additional optional arguments represent labels for buttons to appear along ",
2344 "the bottom of the dialog. Returns the number of the button pressed (the ",
2345 "first button is number 1), or 0 if the user closed the dialog via the window ",
2348 "\01A\01Bfocus_window( window_name )\01A \n",
2349 "\01ISets the window on which subsequent macro commands operate. window_name can ",
2350 "be either a fully qualified file name, or a relative filename (which will ",
2351 "be completed from NEdit's working directory) or one of \"last\" for the last ",
2352 "window created, or \"next\" for the next window in the chain from the currently ",
2353 "focused window (the first window being the one returned from calling ",
2354 "focus_window(\"last\"). Returns the name of the newly-focused window, or an ",
2355 "empty string if the requested window was not found. ",
2357 "\01A\01Bget_character( position )\01A \n",
2358 "\01IReturns the single character at the position ",
2359 "indicated by the first argument to the routine from the current window. ",
2361 "\01A\01Bget_range( start, end )\01A \n",
2362 "\01IReturns the text between a starting and ending position from the current ",
2365 "\01A\01Bget_selection()\01A \n",
2366 "\01IReturns a string containing the text currently selected by the primary ",
2367 "selection either from the current window (no keyword), or from anywhere on ",
2368 "the screen (keyword \"any\"). ",
2370 "\01A\01Bgetenv( name )\01A\n",
2371 "\01IGets the value of an environment variable. ",
2373 "\01A\01Bkill_calltip( [calltip_ID] )\01A\n",
2374 "\01IKills any calltip that is being displayed in the window in which the macro is ",
2375 "running. If there is no displayed calltip this does nothing. If a calltip ",
2376 "ID is supplied then the calltip is killed only if its ID is calltip_ID. ",
2378 "\01A\01Blength( string )\01A\n",
2379 "\01IReturns the length of a string ",
2381 "\01A\01Blist_dialog( message, text, btn_1_label, btn_2_label, ... )\01A \n",
2382 "\01IPop up a dialog for prompting the user to choose a line from the given text ",
2383 "string. The first argument is a message string to be used as a title for the ",
2384 "fixed text describing the list. The second string provides the list data: ",
2385 "this is a text string in which list entries are separated by newline ",
2386 "characters. Additional optional arguments represent labels for ",
2387 "buttons to appear along the bottom of the dialog. Returns the line of text ",
2388 "selected by the user as the function value (without any newline separator) or ",
2389 "the empty string if none was selected, and number of the button pressed (the ",
2390 "first button is number 1), in $list_dialog_button. If the user closes the ",
2391 "dialog via the window close box, the function returns the empty string, and ",
2392 "$list_dialog_button returns 0. ",
2394 "\01A\01Bmax( n1, n2, ... )\01A\n",
2395 "\01IReturns the maximum value of all of its arguments ",
2397 "\01A\01Bmin( n1, n2, ... )\01A\n",
2398 "\01IReturns the minimum value of all of its arguments ",
2400 "\01A\01Bread_file( filename )\01A \n",
2401 "\01IReads the contents of a text file into a string. On success, returns 1 in ",
2402 "$read_status, and the contents of the file as a string in the subroutine ",
2403 "return value. On failure, returns the empty string \"\" and an 0 $read_status. ",
2405 "\01A\01Breplace_in_string( string, search_for, replace_with [, type, \"copy\"] )\01A \n",
2406 "\01IReplaces all occurrences of a search string in a string with a replacement ",
2407 "string. Arguments are 1: string to search in, 2: string to search for, 3: ",
2408 "replacement string. There are two optional arguments. One is a search type, ",
2409 "either \"literal\", \"case\", \"word\", \"caseWord\", \"regex\", or \"regexNoCase\". ",
2410 "The default search type is \"literal\". If the optional \"copy\" argument is ",
2411 "specified, a copy of the input string is returned when no replacements were ",
2412 "performed. By default an empty string (\"\") will be returned in this case. ",
2413 "Returns a new string with all of the replacements done. ",
2415 "\01A\01Breplace_range( start, end, string )\01A \n",
2416 "\01IReplaces all the text between two positions in the current window. If the ",
2417 "cursor position is between start and end it will be set to start. ",
2419 "\01A\01Breplace_selection( string )\01A \n",
2420 "\01IReplaces the primary-selection selected text in the current window. ",
2422 "\01A\01Breplace_substring( string, start, end, replace_with )\01A \n",
2423 "\01IReplacing a substring between two positions in a string within another string. ",
2425 "\01A\01Bsearch( search_for, start [, search_type, wrap, direction] )\01A \n",
2426 "\01ISearches silently in a window without dialogs, beeps, or changes to the ",
2427 "selection. Arguments are: 1: string to search for, 2: starting position. ",
2428 "Optional arguments may include the strings: \"wrap\" to make the search wrap ",
2429 "around the beginning or end of the string, \"backward\" or \"forward\" to change ",
2430 "the search direction (\"forward\" is the default), \"literal\", \"case\", \"word\", ",
2431 "\"caseWord\", \"regex\", or \"regexNoCase\" to change the search type (default is ",
2432 "\"literal\"). Returns the starting position of the match, or -1 if nothing ",
2433 "matched. Also returns the ending position of the match in $search_end. ",
2435 "\01A\01Bsearch_string( string, search_for, start [, search_type, direction] )\01A \n",
2437 "Built-in macro subroutine for searching a string. Arguments are 1: string to ",
2438 "search in, 2: string to search for, 3: starting position. Optional arguments ",
2439 "may include the strings: \"wrap\" to make the search wrap around the beginning ",
2440 "or end of the string, \"backward\" or \"forward\" to change the search direction ",
2441 "(\"forward\" is the default), \"literal\", \"case\", \"word\", \"caseWord\", \"regex\", ",
2442 "or \"regexNoCase\" to change the search type (default is \"literal\"). Returns ",
2443 "the starting position of the match, or -1 if nothing matched. Also returns ",
2444 "the ending position of the match in $search_end. ",
2446 "\01A\01Bselect( start, end )\01A \n",
2447 "\01ISelects (with the primary selection) text in the current buffer between a ",
2448 "starting and ending position. ",
2450 "\01A\01Bselect_rectangle( start, end, left, right )\01A \n",
2451 "\01ISelects a rectangular area of text between a starting and ending position, ",
2452 "and confined horizontally to characters displayed between positions \"left\", ",
2455 "\01A\01Bset_cursor_pos( position )\01A\n",
2456 "\01ISet the cursor position for the current window. ",
2458 "\01A\01Bshell_command( command, input_string )\01A \n",
2459 "\01IExecutes a shell command, feeding it input from input_string. On completion, ",
2460 "output from the command is returned as the function value, and the command's ",
2461 "exit status is returned in the global variable $shell_cmd_status. ",
2463 "\01A\01Bsplit(string, separation_string [, search_type])\01A\n",
2464 "\01ISplits a string using the separator specified. Optionally the search_type ",
2465 "argument can specify how the separation_string is interpreted. The default ",
2466 "is \"literal\". The returned value is an array with keys beginning at 0. ",
2468 "\01A\01Bstring_dialog( message, btn_1_label, btn_2_label, ... )\01A \n",
2469 "\01IPops up a dialog prompting the user to enter information. The first argument ",
2470 "is a string to show in the message area of the dialog. Additional ",
2471 "optional arguments represent labels for buttons to appear along the bottom of ",
2472 "the dialog. Returns the string entered by the user as the function value, ",
2473 "and number of the button pressed (the first button is number 1), in ",
2474 "$string_dialog_button. If the user closes the dialog via the window close ",
2475 "box, the function returns the empty string, and $string_dialog_button returns ",
2478 "\01A\01Bstring_compare(string1, string2 [, consider-case])\01A\n",
2479 "\01ICompare two strings and return 0 if they are equal, -1 if string1 is less ",
2480 "than string2 or 1 if string1 is greater than string2. The values for the ",
2481 "optional consider-case argument is either \"case\" or \"nocase\". The default ",
2482 "is to do a case sensitive comparison. ",
2484 "\01A\01Bstring_to_clipboard( string )\01A \n",
2485 "\01ICopy the contents of a macro string to the clipboard. ",
2487 "\01A\01Bsubstring( string, start [, end] )\01A \n",
2488 "\01IReturns the portion of a string between a start and end position (with the ",
2489 "position of the beginning of the string being 0). If end is missing, the ",
2490 "position of the end of the string is used. If either of the positions are ",
2491 "negative, they are treated as relative to the end of the string. A position ",
2492 "specified either before the start of the string or after the end of the string ",
2493 "is repositioned to the nearest valid string position. If the start position ",
2494 "is beyond the end position, the empty string is returned. ",
2496 "\01A\01Bt_print( string1, string2, ... )\01A \n",
2497 "\01IWrites strings to the terminal (stdout) from which NEdit was started. ",
2499 "\01A\01Btolower( string )\01A\n",
2500 "\01IReturn an all lower-case version of string. ",
2502 "\01A\01Btoupper( string )\01A\n",
2503 "\01IReturn an all upper-case version of string. ",
2505 "\01A\01Bvalid_number( string )\01A\n",
2506 "\01IReturns 1 if the string can be converted to a number without error ",
2507 "following the same rules that the implicit conversion would. Otherwise 0. ",
2509 "\01A\01Bwrite_file( string, filename )\01A \n",
2510 "\01IWrites a string (parameter 1) to a file named in parameter 2. Returns 1 on ",
2511 "successful write, or 0 if unsuccessful. ",
2513 "\01RDeprecated Functions\01I",
2515 "Some functions are included only for supporting legacy macros. You should not ",
2516 "use any of these functions in any new macro you write. Among these are all ",
2517 "action routines with hyphens in their names; use underscores instead ",
2518 "('find-dialog' -> 'find_dialog'). ",
2520 "\01A\01Bmatch()\01A\n",
2521 "\01I\01JDEPRECATED\01I Use select_to_matching() instead. ",
2526 static char * htxt_rangeset
[] = {
2527 "\01IA rangeset is a set of ranges. A range is a contiguous range of characters ",
2528 "defined by its start and end position in the document. The user can ",
2529 "create rangesets, identified by arbitrary integers (chosen by the editor when ",
2530 "the rangesets are created), and each range within a rangeset is identified by ",
2531 "a numeric index, counting from 1, in the order of appearance in the text ",
2532 "buffer. The ranges are adjusted when modifications are made to the text ",
2533 "buffer: they shuffle around when characters are added or deleted. However, ",
2534 "ranges within a set will coalesce if the characters between them are removed, ",
2535 "or a new range is added to the set which bridges or overlaps others. ",
2537 "Using rangesets allows non-contiguous bits of the text to be identified as a ",
2540 "Rangesets can be assigned a background color: characters within a range of a ",
2541 "rangeset will have the background color of the rangeset. If more than one ",
2542 "rangeset includes a given character, its background color will be that of the ",
2543 "most recently created rangeset which has a color defined. ",
2545 "Rangesets must be created using the rangeset_create() function, which ",
2546 "will return an identifier for the newly-created rangeset. This identifier ",
2547 "is then passed to the other rangeset functions to manipulate the rangeset. ",
2549 "There is a limit to the number of rangesets which can exist at any time - ",
2550 "currently up to 63 in each document. Care should be taken to destroy ",
2551 "any rangesets which are no longer needed, by using the rangeset_destroy() ",
2552 "function, if this limit is attained. ",
2554 "Rangesets can be named: this is useful for macros which need a fixed ",
2555 "identification for rangesets which are used for the same purpose in ",
2556 "different documents. Although a new rangeset's number is arbitrary, its ",
2557 "name can be fixed. This is done using the rangeset_set_name() function. ",
2558 "Note that rangeset names within a particular document may not be unique. ",
2559 "For this reason, the rangeset_get_by_name() function returns an array of ",
2560 "identifiers, which will be empty if the name has not been associated with ",
2563 "\01SHow rangesets change with modifications\01I",
2565 "When changes are made to the document text, ranges within each set are altered ",
2566 "with it, according to their behavioral mode. If changes are made outside of ",
2567 "the ranges in a rangeset, each range simply maintains its size and adjusts its ",
2568 "position to match the changes. When text within a range is deleted, the ",
2569 "range's length is reduced by the same amount. When changes involving new text ",
2570 "are made within a range of the set, or to one of the extremities of a range, ",
2571 "different behaviours may be desirable. The rangeset_set_mode() function allows ",
2572 "these modes to be chosen. ",
2574 "Note that the precise behaviour of these modes may change in future versions ",
2577 "The available modes are: ",
2579 "\01Jmaintain\01I or \01Jins_del\01I - ",
2580 "Both these modes have the same behaviour. New text added at the front of a ",
2581 "range in a set is not added to the range; new text added within the range or ",
2582 "at the end extends the range. Replacement overlapping an extremity of the ",
2583 "set acts as if the new text were added first, then the old text deleted. ",
2584 "This causes curtailment at the front of the range, extension at the end. ",
2585 "Replacement of the full text of the range removes the range from the set. ",
2586 "The default behaviour for a newly created rangeset is \01Jmaintain\01I. ",
2588 "\01Jdel_ins\01I - ",
2589 "New text added at the front or end of a range in a set is not added to the ",
2590 "range; new text added within the range extends the range. Replacement ",
2591 "overlapping an extremity of the set acts as if the old text were deleted ",
2592 "first, then the new text added. This causes curtailment at either end. ",
2593 "Replacement of the full text of the range removes the range from the set. ",
2595 "\01Jinclude\01I - ",
2596 "New text added at the front or end of a range in a set extends the range, as ",
2597 "does new text added within the range. Replacement overlapping an extremity ",
2598 "of the set acts as if the new text were added first, then the old text ",
2599 "deleted. This causes curtailment at the front of the range, extension at ",
2600 "the end. Replacement of the full text of the range adds the new text to the ",
2601 "range if the start position of the replacement is at the range's start ",
2604 "\01Jexclude\01I - ",
2605 "New text added at the front or end of a range in a set does not extend the ",
2606 "range; new text added within the range extends the range. Replacement ",
2607 "overlapping an extremity causes curtailment of the range. Replacement of ",
2608 "the full text of the range removes the range from the set. ",
2611 "New text added at the front or end of a range in a set does not extend the ",
2612 "range; new text added within the range will split the range. Replacement ",
2613 "overlapping an extremity causes curtailment of the range. Replacement of ",
2614 "the full text of the range removes the range from the set. ",
2618 "A rangeset is manipulated \01Konly\01I through macro routines. Rangesets ",
2619 "can easily become very large, and may exceed the capacity of the running ",
2620 "process. Coloring relies on proper color names or specifications (such as ",
2621 "the \"#rrggbb\" hexadecimal digit strings), and appropriate hardware support. If ",
2622 "an invalid color name is given, the default background color is used instead. ",
2623 "Behaviours set using rangeset_set_mode() are subject to change in future ",
2626 "\01RRangeset read-only variables\01I",
2628 "\01A\01B$rangeset_list\01A\n",
2629 "\01Iarray of active rangeset identifiers, with integer keys starting at 0, ",
2630 "in the order the rangesets were defined. ",
2632 "\01RRangeset functions\01I",
2634 "\01A\01Brangeset_create()\01A\n",
2635 "\01Brangeset_create( n )\01A\n",
2636 "\01ICreates one or more new rangesets. The first form creates a single range ",
2637 "set and returns its identifier; if there are no rangesets available it ",
2638 "returns 0. The second form creates n new rangesets, and returns an array ",
2639 "of the rangeset identifiers with keys beginning at 0. If the requested ",
2640 "number of rangesets is not available it returns an empty array. ",
2642 "\01A\01Brangeset_destroy( r )\01A\n",
2643 "\01Brangeset_destroy( array )\01A\n",
2644 "\01IDeletes all information about a rangeset or a number of rangesets. The ",
2645 "first form destroys the rangeset identified by r. The second form should ",
2646 "be passed an array of rangeset identifiers with keys beginning at 0 (i.e. ",
2647 "the same form of array returned by rangeset_create(n); it destroys all the ",
2648 "rangesets appearing in the array. If any of the rangesets do not exist, ",
2649 "the function continues without errors. Does not return a value. ",
2651 "\01A\01Brangeset_add( r, [start, end] )\01A\n",
2652 "\01Brangeset_add( r, r0 )\01A\n",
2653 "\01IAdds to the rangeset r. The first form adds the range identified by the ",
2654 "current primary selection to the rangeset, unless start and end are defined, ",
2655 "in which case the range they define is added. Returns the index of the ",
2656 "newly-added range within the rangeset. The second form adds all ranges in ",
2657 "the rangeset r0 to the rangeset r, and returns 0. ",
2659 "\01A\01Brangeset_subtract( r, [start, end] )\01A\n",
2660 "\01Brangeset_subtract( r, r0 )\01A\n",
2661 "\01IRemoves from the rangeset r. The first form removes the range identified by ",
2662 "the current primary selection from the rangeset, unless start and end are ",
2663 "defined, in which case the range they define is removed. The second form ",
2664 "removes all ranges in the rangeset r0 from the rangeset r. Does not return ",
2667 "\01A\01Brangeset_invert( r )\01A\n",
2668 "\01IChanges the rangeset r so that it contains all ranges not in r. Does not ",
2671 "\01A\01Brangeset_get_by_name( name )\01A\n",
2672 "\01IReturns an array of active rangeset identifiers, with integer keys starting at 0, ",
2673 "whose name matches name. ",
2675 "\01A\01Brangeset_info( r )\01A\n",
2676 "\01IReturns an array containing information about the rangeset r. The array ",
2677 "has the following keys: \01Jdefined\01I (whether a rangeset with identifier ",
2678 "r is defined), \01Jcount\01I (the number of ranges in the rangeset), \01Jcolor\01I ",
2679 "(the current background color of the rangeset, an empty string if the ",
2680 "rangeset has no color), \01Jname\01I (the user supplied name of the rangeset, ",
2681 "an empty string if the rangeset has no name), and \01Jmode\01I (the name of the ",
2682 "modify-response mode of the rangeset). ",
2684 "\01A\01Brangeset_range( r, [index] )\01A\n",
2685 "\01IReturns details of a specific range in the rangeset r. The range is ",
2686 "specified by index, which should be between 1 and n (inclusive), where ",
2687 "n is the number of ranges in the rangeset. The return value is an array ",
2688 "containing the keys \01Jstart\01I (the start position of the range) and \01Jend\01I ",
2689 "(the end position of the range). If index is not supplied, the region ",
2690 "returned is the span of the entire rangeset (the region starting at the ",
2691 "start of the first range and ending at the end of the last). If index ",
2692 "is outside the correct range of values, the function returns an empty array. ",
2694 "\01A\01Brangeset_includes( r, pos )\01A\n",
2695 "\01IReturns the index of the range in rangeset r which includes pos; returns ",
2696 "0 if pos is not contained in any of the ranges of r. This can also be used ",
2697 "as a simple true/false function which returns true if pos is contained in ",
2700 "\01A\01Brangeset_set_color( r, color )\01A\n",
2701 "\01IAttempts to apply the color as a background color to the ranges of r. If ",
2702 "color is at empty string, removes the coloring of r. No check is made ",
2703 "regarding the validity of color: if the color is invalid (a bad name, ",
2704 "or not supported by the hardware) this has unpredictable effects. ",
2706 "\01A\01Brangeset_set_name( r, name )\01A\n",
2707 "\01IApply the name to the rangeset r. ",
2709 "\01A\01Brangeset_set_mode( r, type )\01A\n",
2710 "\01IChanges the behaviour of the rangeset r when modifications to the text ",
2711 "buffer occur. type can be one of the following: \"maintain\" (the default), ",
2712 "\"break\", \"include\", \"exclude\", \"ins_del\" or \"del_ins\". (These modes are ",
2713 "described above.) ",
2718 static char * htxt_hiliteInfo
[] = {
2719 "\01IThe user can interrogate the current window to determine the color ",
2720 "highlighting used on a particular piece of text. The following functions ",
2721 "provide information on the highlighting pattern against which text at a ",
2722 "particular position has been matched, its style, color and font attributes ",
2723 "(whether the font is supposed to be bold and/or italic). ",
2725 "These macro functions permit macro writers to generate formatted output which ",
2726 "allows NEdit highlighting to be reproduced. This is suitable for the ",
2727 "generation of HTML or Postscript output, for example. ",
2729 "Note that if any of the functions is used while in Plain mode or while syntax ",
2730 "highlighting is off, the behaviour is undefined. ",
2732 "\01A\01Bget_pattern_by_name( pattern_name )\01A\n",
2733 "\01IReturns an array containing the pattern attributes for pattern 'pattern_name'. ",
2734 "The elements in this array are: ",
2736 " * \01Jstyle\01I -- Highlight style name\n",
2738 "If 'pattern_name' is invalid, an empty array is returned. ",
2740 "\01A\01Bget_pattern_at_pos( pos )\01A\n",
2741 "\01IReturns an array containing the pattern attributes of the character at ",
2742 "position 'pos'. The elements in this array are: ",
2744 " * \01Jpattern\01I -- Highlight pattern name\n",
2745 " * \01Jstyle\01I -- Highlight style name\n",
2746 " * \01Jextent\01I -- The length in the text which uses the same highlighting pattern\n",
2748 "The 'extent' value is measured from position 'pos' going right/down (forward ",
2749 "in the file) only. ",
2751 "If 'pos' is invalid, an empty array is returned. ",
2753 "\01A\01Bget_style_by_name( style_name )\01A\n",
2754 "\01IReturns an array containing the style attributes for style 'style_name'. ",
2755 "The elements in this array are: ",
2757 " * \01Jbold\01I -- '1' if style is bold, '0' otherwise\n",
2758 " * \01Jitalic\01I -- '1' if style is italic, '0' otherwise\n",
2759 " * \01Jcolor\01I -- Name of the style's color\n",
2760 " * \01Jbackground\01I -- Name of the background color, if any\n",
2762 "The colors use the names specified in the color definitions for the style. ",
2763 "These will either be names matching those the X server recognises, or RGB ",
2764 "(red/green/blue) specifications. ",
2766 "If 'style_name' is invalid, an empty array is returned. ",
2768 "\01A\01Bget_style_at_pos( pos )\01A\n",
2769 "\01IReturns an array containing the style attributes of the character at ",
2770 "position 'pos'. The elements in this array are: ",
2772 " * \01Jstyle\01I -- Name of the highlight style\n",
2773 " * \01Jbold\01I -- '1' if style is bold, '0' otherwise\n",
2774 " * \01Jitalic\01I -- '1' if style is italic, '0' otherwise\n",
2775 " * \01Jcolor\01I -- Name of the style's color\n",
2776 " * \01Jrgb\01I -- Color's RGB values ('#rrggbb')\n",
2777 " * \01Jbackground\01I -- Name of the background color, if any\n",
2778 " * \01Jback_rgb\01I -- Background color's RGB values ('#rrggbb')\n",
2779 " * \01Jextent\01I -- The length in the text which uses the same highlight style\n",
2781 "The colors use the names specified in the color definitions for the style. ",
2782 "These will either be names matching those the X server recognises, or RGB ",
2783 "specifications. The values for 'rgb' and 'back_rgb' contain the actual color ",
2784 "values allocated by the X server for the window. If the X server cannot ",
2785 "allocate the specified (named) color exactly, the RGB values in these ",
2786 "entries may not match the specified ones. ",
2788 "The 'extent' value is measured from position 'pos' going right/down (forward ",
2789 "in the file) only. ",
2791 "If 'pos' is invalid, an empty array is returned. ",
2796 static char * htxt_actions
[] = {
2797 "\01IAll of the editing capabilities of NEdit are represented as a special type of ",
2798 "subroutine, called an action routine, which can be invoked from both macros ",
2799 "and translation table entries (see \"\01QKey Binding\01I\" in the ",
2800 "Customizing section of the Help menu). ",
2802 "\01RActions Representing Menu Commands\01I",
2804 "\01A File Menu Search Menu\n",
2805 " ----------------------- -------------------------\n",
2807 " open() find_dialog()\n",
2808 " open_dialog() find_again()\n",
2809 " open_selected() find_selection()\n",
2810 " close() replace()\n",
2811 " save() replace_dialog()\n",
2812 " save_as() replace_all()\n",
2813 " save_as_dialog() replace_in_selection()\n",
2814 " revert_to_saved() replace_again()\n",
2815 " include_file() goto_line_number()\n",
2816 " include_file_dialog() goto_line_number_dialog()\n",
2817 " load_macro_file() goto_selected()\n",
2818 " load_macro_file_dialog() mark()\n",
2819 " load_tags_file() mark_dialog()\n",
2820 " load_tags_file_dialog() goto_mark()\n",
2821 " unload_tags_file() goto_mark_dialog()\n",
2822 " load_tips_file() goto_matching()\n",
2823 " load_tips_file_dialog() select_to_matching()\n",
2824 " unload_tips_file() find_definition()\n",
2825 " print() show_tip()\n",
2826 " print_selection() \n",
2827 " exit() Shell Menu\n",
2828 " -------------------------\n",
2829 " Edit Menu filter_selection_dialog()\n",
2830 " ----------------------- filter_selection()\n",
2831 " undo() execute_command()\n",
2832 " redo() execute_command_dialog()\n",
2833 " delete() execute_command_line()\n",
2834 " select_all() shell_menu_command()\n",
2836 " shift_left_by_tab() Macro Menu\n",
2837 " shift_right() -------------------------\n",
2838 " shift_right_by_tab() macro_menu_command()\n",
2839 " uppercase() repeat_macro()\n",
2840 " lowercase() repeat_dialog()\n",
2841 " fill_paragraph() \n",
2842 " control_code_dialog() Windows Menu\n",
2843 " -------------------------\n",
2846 " detach_document()\n",
2847 " move_document_dialog()\n",
2849 "An action representing a menu command is usually named the same as its ",
2850 "corresponding menu item except that all punctuation is removed, all letters ",
2851 "are changed to lower case, and spaces are replaced with underscores. To ",
2852 "present a dialog to ask the user for input, use the actions with the ",
2853 "`_dialog` suffix. Actions without the `_dialog` suffix take the information ",
2854 "from the routine's arguments (see below). ",
2856 "\01RMenu Action Routine Arguments\01I",
2858 "Arguments are text strings enclosed in quotes. Below are the menu action ",
2859 "routines which take arguments. Optional arguments are enclosed in []. ",
2861 "\01A \01Bnew\01A( [\"tab\" | \"window\" | \"prefs\" | \"opposite\"] )\n",
2863 "\01A \01Bclose\01A( [\"prompt\" | \"save\" | \"nosave\"] )\n",
2865 "\01A \01Bexecute_command\01A( shell-command )\n",
2867 "\01A \01Bfilter_selection\01A( shell-command )\n",
2869 "\01A \01Bfind\01A( search-string [, \01Csearch-direction\01A] [, \01Csearch-type\01A] \n",
2870 " [, \01Csearch-wrap\01A] )\n",
2872 "\01A \01Bfind_again\01A( [\01Csearch-direction\01A] [, \01Csearch-wrap\01A] )\n",
2874 "\01A \01Bfind_definition\01A( [tag-name] )\n",
2876 "\01A \01Bfind_dialog\01A( [\01Csearch-direction\01A] [, \01Csearch-type\01A] \n",
2877 " [, \01Ckeep-dialog\01A] )\n",
2879 "\01A \01Bfind_selection\01A( [\01Csearch-direction\01A] [, \01Csearch-wrap\01A] \n",
2880 " [, \01Cnon-regex-search-type\01A] )\n",
2882 "\01A \01Bgoto_line_number\01A( [\01Cline-number\01A] [, \01Ccolumn-number\01A] )\n",
2884 "\01A \01Bgoto_mark\01A( \01Cmark-letter\01A )\n",
2886 "\01A \01Binclude_file\01A( \01Cfilename\01A )\n",
2888 "\01A \01Bload_tags_file\01A( \01Cfilename\01A )\n",
2890 "\01A \01Bmacro_menu_command\01A( \01Cmacro-menu-item-name\01A )\n",
2892 "\01A \01Bmark\01A( \01Cmark-letter\01A )\n",
2894 "\01A \01Bopen\01A( \01Cfilename\01A )\n",
2896 "\01A \01Breplace\01A( search-string, replace-string, \n",
2897 " [, \01Csearch-direction\01A] [, \01Csearch-type\01A] [, \01Csearch-wrap\01A] )\n",
2899 "\01A \01Breplace_again\01A( [\01Csearch-direction\01A] [, \01Csearch-wrap\01A] )\n",
2901 "\01A \01Breplace_all\01A( search-string, replace-string [, \01Csearch-type\01A] )\n",
2903 "\01A \01Breplace_dialog\01A( [\01Csearch-direction\01A] [, \01Csearch-type\01A]\n",
2904 " [, \01Ckeep-dialog\01A] )\n",
2906 "\01A \01Breplace_in_selection\01A( search-string, \n",
2907 " replace-string [, \01Csearch-type\01A] )\n",
2909 "\01A \01Bsave_as\01A( \01Cfilename\01A )\n",
2911 "\01A \01Bshell_menu_command\01A( \01Cshell-menu-item-name\01A )\n",
2913 "\01A \01Bunload_tags_file\01A( \01Cfilename\01A )\n",
2915 "\01A \01B----------- Some notes on argument types above -----------\01A\n",
2917 "\01A \01CArguments to new()\01A\n",
2918 " \"tab\": Open a new tab\n",
2919 " \"window\": Open a new window\n",
2920 " \"prefs\": Follow the user's tab/window \n",
2922 " \"opposite\": Opposite of user's tab/window \n",
2924 " Default behaviour is \"prefs\".\n",
2926 "\01A \01Cfilename\01A Path names are relative to the directory from\n",
2927 " which NEdit was started. Shell interpreted \n",
2928 " wildcards and `~' are not expanded.\n",
2930 "\01A \01Ckeep-dialog\01A Either \"keep\" or \"nokeep\".\n",
2932 "\01A \01Cmark-letter\01A The mark command limits users to single \n",
2933 " letters. Inside of macros, numeric marks are\n",
2934 " allowed, which won't interfere with marks set\n",
2937 "\01A \01Cmacro-menu-item-name\01A\n",
2938 " Name of the command exactly as specified in \n",
2939 " the Macro Menu dialogs.\n",
2941 "\01A \01Cnon-regex-search-type\01A \n",
2942 " Either \"literal\", \"case\", \"word\", or \n",
2945 "\01A \01Csearch-direction\01A\n",
2946 " Either \"forward\" or \"backward\".\n",
2948 "\01A \01Csearch-type\01A Either \"literal\", \"case\", \"word\", \n",
2949 " \"caseWord\", \"regex\", or \"regexNoCase\".\n",
2951 "\01A \01Csearch-wrap\01A Either \"wrap\" or \"nowrap\".\n",
2953 "\01A \01Cshell-menu-item-name\01A\n",
2954 " Name of the command exactly as specified in \n",
2955 " the Shell Menu dialogs.\n",
2957 "\01RWindow Preferences Actions\01I",
2959 "\01A\01Bset_auto_indent( \"off\" | \"on\" | \"smart\" )\01A\n",
2960 "\01ISet auto indent mode for the current window. ",
2962 "\01A\01Bset_em_tab_dist( em-tab-distance )\01A\n",
2963 "\01ISet the emulated tab size. An em-tab-distance value of ",
2964 "0 or -1 translates to no emulated tabs. Em-tab-distance must ",
2965 "be smaller than 1000. ",
2967 "\01A\01Bset_fonts( font-name, italic-font-name, bold-font-name, bold-italic-font-name )\01A\n",
2968 "\01ISet all the fonts used for the current window. ",
2970 "\01A\01Bset_highlight_syntax( [0 | 1] )\01A\n",
2971 "\01ISet syntax highlighting mode for the current window. ",
2972 "A value of 0 turns it off and a value of 1 turns it on. ",
2973 "If no parameters are supplied the option is toggled. ",
2975 "\01A\01Bset_incremental_backup( [0 | 1] )\01A\n",
2976 "\01ISet incremental backup mode for the current window. ",
2977 "A value of 0 turns it off and a value of 1 turns it on. ",
2978 "If no parameters are supplied the option is toggled. ",
2980 "\01A\01Bset_incremental_search_line( [0 | 1] )\01A\n",
2981 "\01IShow or hide the incremental search line for the current window. ",
2982 "A value of 0 turns it off and a value of 1 turns it on. ",
2983 "If no parameters are supplied the option is toggled. ",
2985 "\01A\01Bset_language_mode( language-mode )\01A\n",
2986 "\01ISet the language mode for the current window. If the language mode is ",
2987 "\"\" or unrecognized, it will be set to Plain. ",
2989 "\01A\01Bset_locked( [0 | 1] )\01A\n",
2990 "\01IThis only affects the locked status of a file, not it's read-only ",
2991 "status. Permissions are NOT changed. ",
2992 "A value of 0 turns it off and a value of 1 turns it on. ",
2993 "If no parameters are supplied the option is toggled. ",
2995 "\01A\01Bset_make_backup_copy( [0 | 1] )\01A\n",
2996 "\01ISet whether backup copies are made during saves for the current window. ",
2997 "A value of 0 turns it off and a value of 1 turns it on. ",
2998 "If no parameters are supplied the option is toggled. ",
3000 "\01A\01Bset_overtype_mode( [0 | 1] )\01A\n",
3001 "\01ISet overtype mode for the current window. ",
3002 "A value of 0 turns it off and a value of 1 turns it on. ",
3003 "If no parameters are supplied the option is toggled. ",
3005 "\01A\01Bset_show_line_numbers( [0 | 1] )\01A\n",
3006 "\01IShow or hide line numbers for the current window. ",
3007 "A value of 0 turns it off and a value of 1 turns it on. ",
3008 "If no parameters are supplied the option is toggled. ",
3010 "\01A\01Bset_show_matching( \"off\" | \"delimiter\" | \"range\" )\01A\n",
3011 "\01ISet show matching (...) mode for the current window. ",
3013 "\01A\01Bset_match_syntax_based( [0 | 1] )\01A\n",
3014 "\01ISet whether matching should be syntax based for the current window. ",
3016 "\01A\01Bset_statistics_line( [0 | 1] )\01A\n",
3017 "\01IShow or hide the statistics line for the current window. ",
3018 "A value of 0 turns it off and a value of 1 turns it on. ",
3019 "If no parameters are supplied the option is toggled. ",
3021 "\01A\01Bset_tab_dist( tab-distance )\01A\n",
3022 "\01ISet the size of hardware tab spacing. Tab-distance must ",
3023 "must be a value greater than 0 and no greater than 20. ",
3025 "\01A\01Bset_use_tabs( [0 | 1] )\01A\n",
3026 "\01ISet whether tabs are used for the current window. ",
3027 "A value of 0 turns it off and a value of 1 turns it on. ",
3028 "If no parameters are supplied the option is toggled. ",
3030 "\01A\01Bset_wrap_margin( wrap-width )\01A\n",
3031 "\01ISet the wrap width for text wrapping of the current window. A value ",
3032 "of 0 means to wrap at window width. ",
3034 "\01A\01Bset_wrap_text( \"none\" | \"auto\" | \"continuous\" )\01A\n",
3035 "\01ISet wrap text mode for the current window. ",
3037 "\01RKeyboard-Only Actions\01I",
3039 "In addition to the arguments listed in the call descriptions below, any ",
3040 "routine involving cursor movement can take the argument \"extend\", meaning, ",
3041 "adjust the primary selection to the new cursor position. Routines which take ",
3042 "the \"extend\" argument as well as mouse dragging operations for both primary ",
3043 "and secondary selections can take the optional keyword \"rect\", meaning, make ",
3044 "the selection rectangular. Any routine that accepts the \"scrollbar\" argument ",
3045 "will move the display but not the cursor or selection. Routines that accept ",
3046 "the \"nobell\" argument will fail silently without beeping, when that argument ",
3049 "\01A\01Bbackward_character( [\"nobell\"] )\01A\n",
3050 "\01IMoves the cursor one character to the left. ",
3052 "\01A\01Bbackward_paragraph([\"nobell\"] )\01A\n",
3053 "\01IMoves the cursor to the beginning of the paragraph, or ",
3054 "if the cursor is already at the beginning of a paragraph, moves the cursor to ",
3055 "the beginning of the previous paragraph. Paragraphs are defined as regions ",
3056 "of text delimited by one or more blank lines. ",
3058 "\01A\01Bbackward_word( [\"nobell\"] )\01A\n",
3059 "\01IMoves the cursor to the beginning of a word, or, if the ",
3060 "cursor is already at the beginning of a word, moves the cursor to the ",
3061 "beginning of the previous word. Word delimiters are user-settable, and ",
3062 "defined by the X resource wordDelimiters. ",
3064 "\01A\01Bbeginning_of_file( [\"scrollbar\"] )\01A\n",
3065 "\01IMoves the cursor to the beginning of the file. ",
3067 "\01A\01Bbeginning_of_line( [\"absolute\"] )\01A \n",
3068 "\01IMoves the cursor to the beginning of the line. If ",
3069 "\"absolute\" is given, always moves to the absolute beginning of line, ",
3070 "regardless of the text wrapping mode. ",
3072 "\01A\01Bbeginning_of_selection()\01A\n",
3073 "\01IMoves the cursor to the beginning of the selection ",
3074 "without disturbing the selection. ",
3076 "\01A\01Bcopy_clipboard()\01A\n",
3077 "\01ICopies the current selection to the clipboard. ",
3079 "\01A\01Bcopy_primary()\01A\n",
3080 "\01ICopies the primary selection to the cursor. ",
3082 "\01A\01Bcopy_to()\01A\n",
3083 "\01IIf a secondary selection exists, copies the secondary selection to ",
3084 "the cursor. If no secondary selection exists, copies the primary selection ",
3085 "to the pointer location. ",
3087 "\01A\01Bcopy_to_or_end_drag()\01A\n",
3088 "\01ICompletes either a secondary selection operation, or a ",
3089 "primary drag. If the user is dragging the mouse to adjust a secondary ",
3090 "selection, the selection is copied and either inserted at the cursor ",
3091 "location, or, if pending-delete is on and a primary selection exists in the ",
3092 "window, replaces the primary selection. If the user is dragging a block of ",
3093 "text (primary selection), completes the drag operation and leaves the text at ",
3094 "it's current location. ",
3096 "\01A\01Bcut_clipboard()\01A\n",
3097 "\01IDeletes the text in the primary selection and places it in ",
3100 "\01A\01Bcut_primary()\01A\n",
3101 "\01ICopies the primary selection to the cursor and deletes it at ",
3102 "its original location. ",
3104 "\01A\01Bdelete_selection()\01A\n",
3105 "\01IDeletes the contents of the primary selection. ",
3107 "\01A\01Bdelete_next_character( [\"nobell\"] )\01A\n",
3108 "\01IIf a primary selection exists, deletes its contents. ",
3109 "Otherwise, deletes the character following the cursor. ",
3111 "\01A\01Bdelete_previous_character( [\"nobell\"] )\01A\n",
3112 "\01IIf a primary selection exists, deletes its ",
3113 "contents. Otherwise, deletes the character before the cursor. ",
3115 "\01A\01Bdelete_next_word( [\"nobell\"] )\01A\n",
3116 "\01IIf a primary selection exists, deletes its contents. ",
3117 "Otherwise, deletes the word following the cursor. ",
3119 "\01A\01Bdelete_previous_word( [\"nobell\"] )\01A\n",
3120 "\01IIf a primary selection exists, deletes its contents. ",
3121 "Otherwise, deletes the word before the cursor. ",
3123 "\01A\01Bdelete_to_start_of_line( [\"nobell\", \"wrap\"] )\01A\n",
3124 "\01IIf a primary selection exists, deletes its contents. Otherwise, deletes the ",
3125 "characters between the cursor and the start of the line. If \"wrap\" is ",
3126 "given, deletes to the previous wrap point or beginning of line, whichever ",
3129 "\01A\01Bdelete_to_end_of_line( [\"nobell\", \"absolute\"] )\01A\n",
3130 "\01IIf a primary selection exists, deletes its contents. ",
3131 "Otherwise, deletes the characters between the cursor and the end of the line. ",
3132 "If \"absolute\" is given, always deletes to the absolute end of line, regardless ",
3133 "of the text wrapping mode. ",
3135 "\01A\01Bdeselect_all()\01A\n",
3136 "\01IDe-selects the primary selection. ",
3138 "\01A\01Bend_of_file( [\"scrollbar\"] )\01A\n",
3139 "\01IMoves the cursor to the end of the file. ",
3141 "\01A\01Bend_of_line( [\"absolute\"] )\01A \n",
3142 "\01IMoves the cursor to the end of the line. If ",
3143 "\"absolute\" is given, always moves to the absolute end of line, regardless ",
3144 "of the text wrapping mode. ",
3146 "\01A\01Bend_of_selection()\01A\n",
3147 "\01IMoves the cursor to the end of the selection without ",
3148 "disturbing the selection. ",
3150 "\01A\01Bexchange( [\"nobell\"] )\01A\n",
3151 "\01IExchange the primary and secondary selections. ",
3153 "\01A\01Bextend_adjust()\01A\n",
3154 "\01IAttached mouse-movement events to begin a selection between ",
3155 "the cursor and the mouse, or extend the primary selection to the mouse ",
3158 "\01A\01Bextend_end()\01A\n",
3159 "\01ICompletes a primary drag-selection operation. ",
3161 "\01A\01Bextend_start()\01A\n",
3162 "\01IBegins a selection between the cursor and the mouse. A ",
3163 "drag-selection operation can be started with either extend_start or ",
3166 "\01A\01Bfocus_pane( [relative-pane] | [positive-index] | [negative-index] )\01A\n",
3167 "\01IMove the focus to the requested pane. ",
3168 "Arguments can be specified in the form of a relative-pane ",
3169 "(\"first\", \"last\", \"next\", \"previous\"), a positive-index ",
3170 "(numbers greater than 0, 1 is the same as \"first\") or a ",
3171 "negative-index (numbers less than 0, -1 is the same as \"last\"). ",
3173 "\01A\01Bforward_character()\01A\n",
3174 "\01IMoves the cursor one character to the right. ",
3176 "\01A\01Bforward_paragraph( [\"nobell\"] )\01A\n",
3177 "\01IMoves the cursor to the beginning of the next paragraph. ",
3178 "Paragraphs are defined as regions of text delimited by one or more blank ",
3181 "\01A\01Bforward_word( [\"tail\"] [\"nobell\"] )\01A\n",
3182 "\01IMoves the cursor to the beginning of the next word. Word ",
3183 "delimiters are user-settable, and defined by the X resource wordDelimiters. ",
3184 "If the \"tail\" argument is supplied the cursor will be moved to ",
3185 "the end of the current word or the end of the next word, if the ",
3186 "cursor is between words. ",
3188 "\01A\01Bgrab_focus()\01A\n",
3189 "\01IMoves the cursor to the mouse pointer location, and prepares for ",
3190 "a possible drag-selection operation (bound to extend_adjust), or multi-click ",
3191 "operation (a further grab_focus action). If a second invocation of grab ",
3192 "focus follows immediately, it selects a whole word, or a third, a whole line. ",
3194 "\01A\01Binsert_string( \"string\" )\01A\n",
3195 "\01IIf pending delete is on and the cursor is inside the ",
3196 "selection, replaces the selection with \"string\". Otherwise, inserts \"string\" ",
3197 "at the cursor location. ",
3199 "\01A\01Bkey_select( \"direction\" [,\"nobell\"] )\01A\n",
3200 "\01IMoves the cursor one character in \"direction\" ",
3201 "(\"left\", \"right\", \"up\", or \"down\") and extends the selection. Same as ",
3202 "forward/backward-character(\"extend\"), or process-up/down(\"extend\"), for ",
3203 "compatibility with previous versions. ",
3205 "\01A\01Bmove-destination()\01A\n",
3206 "\01IMoves the cursor to the pointer location without ",
3207 "disturbing the selection. (This is an unusual way of working. We left it in ",
3208 "for compatibility with previous versions, but if you actually use this ",
3209 "capability, please send us some mail, otherwise it is likely to disappear in ",
3212 "\01A\01Bmove_to()\01A\n",
3213 "\01IIf a secondary selection exists, deletes the contents of the ",
3214 "secondary selection and inserts it at the cursor, or if pending-delete is on ",
3215 "and there is a primary selection, replaces the primary selection. If no ",
3216 "secondary selection exists, moves the primary selection to the pointer ",
3217 "location, deleting it from its original position. ",
3219 "\01A\01Bmove_to_or_end_drag()\01A\n",
3220 "\01ICompletes either a secondary selection operation, or a ",
3221 "primary drag. If the user is dragging the mouse to adjust a secondary ",
3222 "selection, the selection is deleted and either inserted at the cursor ",
3223 "location, or, if pending-delete is on and a primary selection exists in the ",
3224 "window, replaces the primary selection. If the user is dragging a block of ",
3225 "text (primary selection), completes the drag operation and deletes the text ",
3226 "from it's current location. ",
3228 "\01A\01Bnewline()\01A\n",
3229 "\01IInserts a newline character. If Auto Indent is on, lines up the ",
3230 "indentation of the cursor with the current line. ",
3232 "\01A\01Bnewline_and_indent()\01A\n",
3233 "\01IInserts a newline character and lines up the indentation ",
3234 "of the cursor with the current line, regardless of the setting of Auto ",
3237 "\01A\01Bnewline_no_indent()\01A\n",
3238 "\01IInserts a newline character, without automatic ",
3239 "indentation, regardless of the setting of Auto Indent. ",
3241 "\01A\01Bnext_page( [\"stutter\"] [\"column\"] [\"scrollbar\"] [\"nobell\"] )\01A\n",
3242 "\01IMoves the cursor and scroll forward one page. ",
3243 "The parameter \"stutter\" moves the cursor to the bottom of the display, ",
3244 "unless it is already there, otherwise it will page down. ",
3245 "The parameter \"column\" will maintain the preferred column while ",
3246 "moving the cursor. ",
3248 "\01A\01Bpage_left( [\"scrollbar\"] [\"nobell\"] )\01A\n",
3249 "\01IMove the cursor and scroll left one page. ",
3251 "\01A\01Bpage_right( [\"scrollbar\"] [\"nobell\"] )\01A\n",
3252 "\01IMove the cursor and scroll right one page. ",
3254 "\01A\01Bpaste_clipboard()\01A\n",
3255 "\01IInsert the contents of the clipboard at the cursor, or if ",
3256 "pending delete is on, replace the primary selection with the contents of the ",
3259 "\01A\01Bprevious_page( [\"stutter\"] [\"column\"] [\"scrollbar\"] [\"nobell\"] )\01A\n",
3260 "\01IMoves the cursor and scroll backward one page. ",
3261 "The parameter \"stutter\" moves the cursor to the top of the display, ",
3262 "unless it is already there, otherwise it will page up. ",
3263 "The parameter \"column\" will maintain the preferred column while ",
3264 "moving the cursor. ",
3266 "\01A\01Bprocess_bdrag()\01A\n",
3267 "\01ISame as secondary_or_drag_start for compatibility with previous versions. ",
3269 "\01A\01Bprocess_cancel()\01A\n",
3270 "\01ICancels the current extend_adjust, secondary_adjust, or ",
3271 "secondary_or_drag_adjust in progress. ",
3273 "\01A\01Bprocess_down( [\"nobell\", \"absolute\"] )\01A\n",
3274 "\01IMoves the cursor down one line. If \"absolute\" is given, always moves to the ",
3275 "next line in the text buffer, regardless of wrapping. ",
3277 "\01A\01Bprocess_return()\01A\n",
3278 "\01ISame as newline for compatibility with previous versions. ",
3280 "\01A\01Bprocess_shift_down( [\"nobell\", \"absolute\"] )\01A\n",
3281 "\01ISame as process_down(\"extend\") for compatibility with previous versions. ",
3283 "\01A\01Bprocess_shift_up( [\"nobell\", \"absolute\"] )\01A\n",
3284 "\01ISame as process_up(\"extend\") for compatibility with previous versions. ",
3286 "\01A\01Bprocess_tab()\01A\n",
3287 "\01IIf tab emulation is turned on, inserts an emulated tab, ",
3288 "otherwise inserts a tab character. ",
3290 "\01A\01Bprocess_up( [\"nobell\", \"absolute\"] )\01A\n",
3291 "\01IMoves the cursor up one line. If \"absolute\" is given, always moves to the ",
3292 "previous line in the text buffer, regardless of wrapping. ",
3294 "\01A\01Braise_window([relative-window] | [positive-index] | [negative-index] [, \"focus\" | \"nofocus\"])\01A\n",
3295 "\01IRaise the current focused window to the front if no argument is supplied. ",
3296 "Arguments can be specified in the form of a relative-window ",
3297 "(\"first\", \"last\", \"next\", \"previous\"), a positive-index ",
3298 "(numbers greater than 0, 1 is the same as \"last\") or a ",
3299 "negative-index (numbers less than 0, -1 is the same as \"first\"). ",
3301 "Moreover, it can be specified whether or not the raised window should ",
3302 "request the X input focus. By default, it depends on the setting of the ",
3303 "nedit.focusOnRaise resource (see the section \"\01QX Resources\01I\") whether or not ",
3304 "the input focus is requested. ",
3306 "\01A\01Bscroll_down( nUnits, [\"lines\" | \"pages\"] )\01A\n",
3307 "\01IScroll the display down (towards the end of the file) by a given ",
3308 "number of units, units being lines or pages. Default units are lines. ",
3310 "\01A\01Bscroll_left( nPixels )\01A\n",
3311 "\01IScroll the display left by nPixels. ",
3313 "\01A\01Bscroll_right( nPixels )\01A\n",
3314 "\01IScroll the display right by nPixels. ",
3316 "\01A\01Bscroll_up( nUnits, [\"lines\" | \"pages\"] )\01A\n",
3317 "\01IScroll the display up (towards the beginning of the file) by a given ",
3318 "number of units, units being lines or pages. Default units are lines. ",
3320 "\01A\01Bscroll_to_line( lineNum )\01A\n",
3321 "\01IScroll to position line number lineNum at the top of ",
3322 "the pane. The first line of a file is line 1. ",
3324 "\01A\01Bsecondary_adjust()\01A\n",
3325 "\01IAttached mouse-movement events to extend the secondary ",
3326 "selection to the mouse position. ",
3328 "\01A\01Bsecondary_or_drag_adjust()\01A\n",
3329 "\01IAttached mouse-movement events to extend the ",
3330 "secondary selection, or reposition the primary text being dragged. Takes two ",
3331 "optional arguments, \"copy\", and \"overlay\". \"copy\" leaves a copy of the ",
3332 "dragged text at the site at which the drag began. \"overlay\" does the drag in ",
3333 "overlay mode, meaning the dragged text is laid on top of the existing text, ",
3334 "obscuring and ultimately deleting it when the drag is complete. ",
3336 "\01A\01Bsecondary_or_drag_start()\01A\n",
3337 "\01ITo be attached to a mouse down event. Begins drag ",
3338 "selecting a secondary selection, or dragging the contents of the primary ",
3339 "selection, depending on whether the mouse is pressed inside of an existing ",
3340 "primary selection. ",
3342 "\01A\01Bsecondary_start()\01A\n",
3343 "\01ITo be attached to a mouse down event. Begin drag selecting ",
3344 "a secondary selection. ",
3346 "\01A\01Bselect_all()\01A\n",
3347 "\01ISelect the entire file. ",
3349 "\01A\01Bself_insert()\01A\n",
3350 "\01ITo be attached to a key-press event, inserts the character ",
3351 "equivalent of the key pressed. ",
3356 static char * htxt_customize
[] = {
3357 "\01INEdit can be customized many different ways. The most important ",
3358 "user-settable options are presented in the Preferences menu, including all ",
3359 "options that users might need to change during an editing session. Options ",
3360 "set in the Default Settings sub-menu of the Preferences menu can be preserved ",
3361 "between sessions by selecting Save Defaults, which writes the changes to the ",
3362 "preferences file. See the section titled \"\01QPreferences\01I\" for more details. ",
3364 "User defined commands can be added to NEdit's Shell, Macro, and window ",
3365 "background menus. Dialogs for creating items in these menus can be found ",
3366 "under Customize Menus in the Default Settings sub menu of the Preferences ",
3369 "For users who depend on NEdit every day and want to tune every excruciating ",
3370 "detail, there are also X resources for tuning a vast number of such details, ",
3371 "down to the color of each individual button. See the section \"\01QX Resources\01I\" ",
3372 "for more information, as well as a list of selected resources. ",
3374 "The most common reason customizing your X resources for NEdit, however, is ",
3375 "key binding. While limited key binding can be done through Preferences ",
3376 "settings (Preferences -> Default Settings -> Customize Menus), you can really ",
3377 "only add keys this way, and each key must have a corresponding menu item. ",
3378 "Any significant changes to key binding should be made via the Translations ",
3379 "resource and menu accelerator resources. The sections titled \"\01QKey Binding\01I\" ",
3380 "and \"\01QX Resources\01I\" have more information. ",
3384 static char * htxt_preferences
[] = {
3385 "\01IThe Preferences menu allows you to set options for both the current editing ",
3386 "window, and default values for newly created windows and future NEdit ",
3387 "sessions. Options in the Preferences menu itself (not in the Default ",
3388 "Settings sub-menu) take effect immediately and refer to the current window ",
3389 "only. Options in the Default Settings sub-menu provide initial settings for ",
3390 "future windows created using the New or Open commands; options affecting all ",
3391 "windows are also set here. ",
3392 "Preferences set in the Default Settings sub-menu can be saved in a file that ",
3393 "is automatically read by NEdit at startup time, by selecting Save Defaults. ",
3395 "\01RPreferences Menu\01I",
3397 "\01A\01BDefault Settings\01A\n",
3398 "\01IMenu of initial settings for future windows. Generally the same as the ",
3399 "options in the main part of the menu, but apply as defaults for future ",
3400 "windows created during this NEdit session. These settings can be saved using ",
3401 "the Save Defaults command below, to be loaded automatically each time NEdit ",
3404 "\01A\01BSave Defaults\01A\n",
3405 "\01ISave the default options as set under Default Settings for future NEdit ",
3408 "\01A\01BStatistics Line\01A\n",
3409 "\01IShow the full file name, line number, and length of the file being edited. ",
3411 "\01A\01BIncremental Search Line\01A\n",
3412 "\01IKeep the incremental search bar (Search -> Find Incremental) permanently ",
3413 "displayed at the top of the window. ",
3415 "\01A\01BShow Line Numbers\01A\n",
3416 "\01IDisplay line numbers to the right of the text. ",
3418 "\01A\01BLanguage Mode\01A\n",
3419 "\01ITells NEdit what language (if any) to assume, for selecting language-specific ",
3420 "features such as highlight patterns and smart indent macros, and setting ",
3421 "language specific preferences like word delimiters, tab emulation, and ",
3422 "auto-indent. See Features for Programming -> \01QProgramming with NEdit\01I for ",
3423 "more information. ",
3425 "\01A\01BAuto Indent\01A\n",
3426 "\01ISetting Auto Indent \"on\" maintains a running indent (pressing the Return key ",
3427 "will line up the cursor with the indent level of the previous line). If ",
3428 "smart indent macros are available for the current language mode, smart indent ",
3429 "can be selected and NEdit will attempt to guess proper language indentation ",
3430 "for each new line. See Help -> Features for Programming -> Automatic Indent ",
3431 "for more information. ",
3433 "\01A\01BWrap\01A\n",
3434 "\01IChoose between two styles of automatic wrapping or none. Auto Newline wrap, ",
3435 "wraps text at word boundaries when the cursor reaches the right margin, by ",
3436 "replacing the space or tab at the last word boundary with a newline ",
3437 "character. Continuous Wrap wraps long lines which extend past the right ",
3438 "margin. Continuous Wrap mode is typically used to produce files where ",
3439 "newlines are omitted within paragraphs, to make text filling automatic (a ",
3440 "kind of poor-man's word processor). Text of this style is common on Macs and ",
3441 "PCs but is not necessarily supported very well under Unix (except in programs ",
3442 "which deal with e-mail, for which it is often the format of choice). ",
3444 "\01A\01BWrap Margin\01A\n",
3445 "\01ISet margin for Auto Newline Wrap, Continuous Wrap, and Fill Paragraph. Lines ",
3446 "may, be wrapped at the right margin of the window, or the margin can be set ",
3447 "at a specific column. ",
3449 "\01A\01BTab Stops\01A\n",
3450 "\01ISet the tab distance (number of characters between tab stops) for tab ",
3451 "characters, and control tab emulation and use of tab characters in padding ",
3452 "and emulated tabs. ",
3454 "\01A\01BText Font...\01A\n",
3455 "\01IChange the font(s) used to display text (fonts for menus and dialogs must be ",
3456 "set using X resources for the text area of the window). See below for more ",
3459 "\01A\01BHighlight Syntax\01A\n",
3460 "\01IIf NEdit recognizes the language being edited, and highlighting patterns are ",
3461 "available for that language, use fonts and colors to enhance viewing of the ",
3462 "file. (See Help -> Features for Programming -> Syntax Highlighting for more ",
3465 "\01A\01BMake Backup Copy\01A\n",
3466 "\01IOn Save, write a backup copy of the file as it existed before the Save ",
3467 "command with the extension .bck (Unix only). ",
3469 "\01A\01BIncremental Backup\01A\n",
3470 "\01IPeriodically make a backup copy of the file being edited under the name ",
3471 "`~filename` on Unix or `_filename` on VMS (see \01QCrash Recovery\01I). ",
3473 "\01A\01BShow Matching (..)\01A\n",
3474 "\01IMomentarily highlight matching parenthesis, brackets, and braces, or the ",
3475 "range between them, when one of these characters is typed, or when the ",
3476 "insertion cursor is positioned after it. Delimiter only highlights the ",
3477 "matching delimiter, while Range highlights the whole range of text between ",
3478 "the matching delimiters. ",
3480 "Optionally, the matching can make use of syntax information if syntax ",
3481 "highlighting is enabled. Alternatively, the matching is purely character ",
3482 "based. In general, syntax based matching results in fewer false matches. ",
3484 "\01A\01BOvertype\01A\n",
3485 "\01IIn overtype mode, new characters entered replace the characters in front of ",
3486 "the insertion cursor, rather than being inserted before them. ",
3488 "\01A\01BRead Only\01A\n",
3489 "\01ILock the file against accidental modification. This temporarily prevents the ",
3490 "file from being modified in this NEdit session. Note that this is different ",
3491 "from setting the file protection. ",
3493 "\01RPreferences -> Default Settings Menu\01I",
3495 "Options in the Preferences -> Default Settings menu have the same meaning as ",
3496 "those in the top-level Preferences menu, except that they apply to future ",
3497 "NEdit windows and future NEdit sessions if saved with the Save Defaults ",
3498 "command. Additional options which appear in this menu are: ",
3500 "\01A\01BLanguage Modes\01A\n",
3501 "\01IDefine language recognition information (for determining language mode from ",
3502 "file name or content) and set language specific preferences. ",
3504 "\01A\01BTag Collisions\01A\n",
3505 "\01IHow to react to multiple tags for the same name. Tags are described in the ",
3506 "section: Features for Programmers -> Finding Declarations (ctags). In Show ",
3507 "All mode, all matching tags are displayed in a dialog. In Smart mode, if one ",
3508 "of the matching tags is in the current window, that tag is chosen, without ",
3509 "displaying the dialog. ",
3511 "\01A\01BColors...\01A\n",
3512 "\01IChange the colors used to display text. The \"Matching (..)\" fields change the ",
3513 "colors that matching parens, brackets and braces are flashed when the \"Show ",
3514 "Matching (..)\" option is enabled. Note that the foreground colors for plain ",
3515 "text, selected text, and matching paren flashing only apply when syntax ",
3516 "highlighting is disabled. When syntax highlighting is enabled, text (even ",
3517 "text that appears plain) will always be colored according to its highlighting ",
3518 "style. (For information on changing syntax highlighting styles and matching ",
3519 "patterns use see Help -> Features for Programming -> \01QSyntax Highlighting\01I.) ",
3521 "\01A\01BCustomize Menus\01A\n",
3522 "\01IAdd/remove items from the Shell, Macro, and window background menus (see ",
3525 "\01A\01BCustomize Window Title\01A\n",
3526 "\01IOpens a dialog where the information to be displayed in the window's title ",
3527 "field can be defined and tested. The dialog contains a Help button, providing ",
3528 "further information about the options available. ",
3530 "\01A\01BSearching\01A\n",
3531 "\01IOptions for controlling the behavior of Find and Replace commands: ",
3533 "\01KVerbose\01I - ",
3534 "Presents search results in dialog form, asks before wrapping a ",
3535 "search back around the beginning (or end) of the file ",
3536 "(unless Beep On Search Wrap is turned on). ",
3538 "\01KWrap Around\01I - ",
3539 "Search and Replace operations wrap around the beginning (or end) of the file. ",
3541 "\01KBeep On Search Wrap\01I - ",
3542 "Beep when Search and Replace operations wrap around the beginning (or end) of ",
3543 "the file (only if Wrap Around is turned on). ",
3545 "\01KKeep Dialogs Up\01I - ",
3546 "Don't pop down Replace and Find boxes after searching. ",
3548 "\01KDefault Search Style\01I - ",
3549 "Initial setting for search type in Find and Replace dialogs. ",
3551 "\01KDefault Replace Scope\01I - ",
3552 "[THIS OPTION IS ONLY PRESENT WHEN NEDIT WAS COMPILED WITH THE ",
3553 "\01A -DREPLACE_SCOPE FLAG TO SELECT AN ALTERNATIVE REPLACE DIALOG LAYOUT.]\n",
3555 "Initial setting for the scope in the Replace/Find dialog, when a selection ",
3556 "exists. It can be either \"In Window\", \"In Selection\", or \"Smart\". \"Smart\" ",
3557 "results in \"In Window\" if the size of the selection is smaller than 1 line, ",
3558 "and to \"In Selection\" otherwise. ",
3560 "\01A\01BSyntax Highlighting\01A\n",
3561 "\01IProgram and configure enhanced text display for new or supported languages ",
3562 "(See Features for Programming -> \01QSyntax Highlighting\01I). ",
3564 "\01A\01BTabbed Editing\01A\n",
3565 "\01IOptions for controlling the tabbed interface: ",
3567 "\01KOpen File in New Tab\01I - ",
3568 "Open files in new tabs, else open files in new windows. ",
3570 "\01KShow Tab Bar\01I - ",
3571 "Show/Hide the tab bar. ",
3573 "\01KHide Tab Bar when only one Document is open\01I ",
3575 "\01KNext/Prev Tabs Across Windows\01I - ",
3576 "Suppose there are two windows with three tabs in the first window and two tabs in ",
3577 "the second window. Enabling this option, if you are on the third tab in the ",
3578 "first window, hitting Ctrl+PageDown would switch to the first tab in the second ",
3579 "window (instead of switching to the first tab in the first window). ",
3581 "\01KSort Tabs Alphabetically\01I ",
3583 "\01A\01BShow Tooltips\01A\n",
3584 "\01IShow file name and path in a tooltip when moving the mouse pointer over a tab ",
3585 "(See Basic Operations -> \01QTabbed Editing\01I). ",
3587 "\01A\01BTerminate with Line Break on Save\01A\n",
3588 "\01ISome UNIX tools expect that files end with a line feed. If this option is ",
3589 "activated, NEdit will append one if required. ",
3591 "\01A\01BSort Open Prev. Menu\01A\n",
3592 "\01IOption to order the File -> Open Previous menu alphabetically, versus in ",
3593 "order of last access. ",
3595 "\01A\01BPopups Under Pointer\01A\n",
3596 "\01IDisplay pop-up dialogs centered on the current mouse position, as opposed to ",
3597 "centered on the parent window. This generally speeds interaction, and is ",
3598 "essential for users who set their window managers so keyboard focus ",
3599 "follows the mouse. ",
3601 "\01A\01BAuto-Scroll Near Window Top/Bottom\01A\n",
3602 "\01IWhen this option is enabled the window will automatically scroll when the ",
3603 "cursor comes 4 lines from the top or bottom of the window (except at the ",
3604 "beginning of the file). The number of lines can be customized with the ",
3605 "nedit.autoScrollVPadding resource. ",
3607 "\01A\01BWarnings\01A\n",
3608 "\01IOptions for controlling the popping up of warning dialogs: ",
3610 "\01KFile Modified Externally\01I - ",
3611 "Pop up a warning dialog when files get changed external to NEdit. ",
3613 "\01KCheck Modified File Contents\01I - ",
3614 "If external file modification warnings are requested, also check the file ",
3615 "contents iso. only the modification date. ",
3617 "\01KExit Warnings\01I - ",
3618 "Ask before exiting when two or more files are open in an NEdit session. ",
3620 "\01A\01BInitial Window Size\01A\n",
3621 "\01IDefault size for new windows. ",
3623 "\01RChanging Font(s)\01I",
3625 "The font used to display text in NEdit is set under Preferences -> Text Font ",
3626 "(for the current window), or Preferences -> Default Settings Text Font (for ",
3627 "future windows). These dialogs also allow you to set fonts for syntax ",
3628 "highlighting. If you don't intend to use syntax highlighting, you can ignore ",
3629 "most of the dialog, and just set the field labeled Primary Font. ",
3631 "Unless you are absolutely certain about the types of files that you will be ",
3632 "editing with NEdit, you should choose a fixed-spacing font. Many, if not ",
3633 "most, plain-text files are written expecting to be viewed with fixed ",
3634 "character spacing, and will look wrong with proportional spacing. NEdit's ",
3635 "filling, wrapping, and rectangular operations will also work strangely if you ",
3636 "choose a proportional font. ",
3638 "Note that in the font browser (the dialog brought up by the Browse... ",
3639 "button), the subset of fonts which are shown is narrowed depending on the ",
3640 "characteristics already selected. It is therefore important to know that you ",
3641 "can unselect characteristics from the lists by clicking on the selected items ",
3644 "Fonts for syntax highlighting should ideally match the primary font in both ",
3645 "height and spacing. A mismatch in spacing will result in similar distortions ",
3646 "as choosing a proportional font: column alignment will sometimes look wrong, ",
3647 "and rectangular operations, wrapping, and filling will behave strangely. A ",
3648 "mismatch in height will cause windows to re-size themselves slightly when ",
3649 "syntax highlighting is turned on or off, and increase the inter- line spacing ",
3650 "of the text. Unfortunately, on some systems it is hard to find sets of fonts ",
3651 "which match exactly in height. ",
3653 "\01RCustomizing Menus\01I",
3655 "You can add or change items in the Shell, Macro, and window background menus ",
3656 "under Preferences -> Default Settings -> Customize Menus. When you choose ",
3657 "one of these, you will see a dialog with a list of the current ",
3658 "user-configurable items from the menu on the left. To change an existing ",
3659 "item, select it from the list, and its properties will appear in the ",
3660 "remaining fields of the dialog, where you may change them. Selecting the ",
3661 "item \"New\" from the list allows you to enter new items in the menu. ",
3663 "Hopefully most of the characteristics are self explanatory, but here are a ",
3664 "few things to note: ",
3666 "Accelerator keys are keyboard shortcuts which appear on the right hand side ",
3667 "of the menus, and allow you avoid pulling down the menu and activate the ",
3668 "command with a single keystroke. Enter accelerators by typing the keys ",
3669 "exactly as you would to activate the command. ",
3671 "Mnemonics are a single letter which should be part of the menu item name, ",
3672 "which allow users to traverse and activate menu items by typing keys when the ",
3673 "menu is pulled down. ",
3675 "In the Shell Command field of the Shell Commands dialog, the % character ",
3676 "expands to the name (including directory path) of the file in the window. To ",
3677 "include a % character in the command, use %%. ",
3679 "The Menu Entry field can contain special characters for constructing ",
3680 "hierarchical sub-menus, and for making items which appear only in certain ",
3681 "language modes. The right angle bracket character \">\" creates a sub-menu. ",
3682 "The name of the item itself should be the last element of the path formed ",
3683 "from successive sub-menu names joined with \">\". Menu panes are called in to ",
3684 "existence simply by naming them as part of a Menu Entry name. To put several ",
3685 "items in the same sub-menu, repeat the same hierarchical sequence for each. ",
3686 "For example, in the Macro Commands dialog, two items with menu entries: a>b>c ",
3687 "and a>b>d would create a single sub menu under the macro menu called \"a\", ",
3688 "which would contain a single sub-menu, b, holding the actual items, c and d: ",
3690 "\01A +---++---++---+\n",
3691 " |a >||b >||c |\n",
3692 " +---++---+|d |\n",
3695 "To qualify a menu entry with a language mode, simply add an at-sign \"@\" at ",
3696 "the end of the menu command, followed (no space) by a language mode name. To ",
3697 "make a menu item which appears in several language modes, append additional ",
3698 "@s and language mode names. For example, an item with the menu entry: ",
3700 "\01A Make C Prototypes@C@C++\n",
3702 "would appear only in C and C++ language modes, and: ",
3704 "\01A Make Class Template@C++\n",
3706 "would appear only in C++ mode. ",
3708 "Menu items with no qualification appear in all language modes. ",
3710 "If a menu item is followed by the single language qualification \"@*\", that ",
3711 "item will appear only if there are no applicable language-specific items of ",
3712 "the same name in the same submenu. For example, if you have the following ",
3713 "three entries in the same menu: ",
3715 "\01A Make Prototypes@C@C++\n",
3716 " Make Prototypes@Java\n",
3717 " Make Prototypes@*\n",
3719 "The first will be available when the language mode is C or C++, the second ",
3720 "when the language mode is Java, and for all other language modes (including ",
3721 "the \"Plain\" non-language mode). If the entry: ",
3723 "\01A Make Prototypes\n",
3725 "also exists, this will always appear, meaning that the menu will always have ",
3726 "two \"Make Prototypes\" entries, whatever the language mode. ",
3728 "\01RThe NEdit Preferences File\01I",
3730 "The NEdit saved preferences file is an X resource file, and its contents can ",
3731 "be moved into another X resource file (see \01QX Resources\01I). One reason for ",
3732 "doing so would be to attach server specific preferences, such as a default ",
3733 "font to a particular X server. Another reason for moving preferences into the ",
3734 "X resource file would be to keep preferences menu options and resource ",
3735 "settable options together in one place. ",
3736 "Though the files are the same format, additional resources should not be added ",
3737 "to the preference file since NEdit modifies this file by overwriting it ",
3738 "completely. Note also that the contents of the preference file take ",
3739 "precedence over the values of X resources. ",
3740 "Using Save Defaults after moving the contents of your preference file to your ",
3741 ".Xdefaults file will re-create the preference file, interfering with the ",
3742 "options that you have moved. ",
3743 "The location of NEdit's preferences file depends on your environment: ",
3745 " * The default place for the file is '$HOME/.nedit/nedit.rc',\n",
3746 " * if the variable $NEDIT_HOME is set in your environment it is located at '$NEDIT_HOME/nedit.rc',\n",
3747 " * you may also use old-style run control files; in this case, the preferences are stored in $HOME/.nedit.\n",
3749 "(For VMS, the file is in '$NEDIT_HOME/nedit.rc' if $NEDIT_HOME is set, in ",
3750 "'SYS$LOGIN:.nedit' otherwise.) ",
3752 "\01RSharing Customizations with Other NEdit Users\01I",
3754 "If you have written macro or shell menu commands, highlight patterns, or ",
3755 "smart-indent macros that you want to share with other NEdit users, you can ",
3756 "make a file which they can load into their NEdit environment. ",
3758 "To load such a file, start NEdit with the command: ",
3760 "\01A nedit -import <file>\n",
3762 "In the new NEdit session, verify that the imported patterns or macros do what ",
3763 "you want, then select Preferences -> Save Defaults. Saving incorporates the ",
3764 "changes into the nedit preferences file, so the next time you run NEdit, you ",
3765 "will not have to import the distribution file. ",
3767 "Loading a customization file is automated, but creating one is not. To ",
3768 "produce a file to be imported by other users, you must make a copy of your own ",
3769 "NEdit configuration file, and edit it, by hand, to remove everything but the ",
3770 "few items of interest to the recipient. Leave only the individual ",
3771 "resource(s), and within those resources, only the particular macro, pattern, ",
3772 "style, etc, that you wish to exchange. ",
3774 "For example, to share a highlighting pattern set, you would include the ",
3775 "patterns, any new styles you added, and language mode information only if the ",
3776 "patterns are intended to support a new language rather than updating an ",
3777 "existing one. For example: ",
3779 "\01A nedit.highlightPatterns:\\\n",
3780 " My Language:1:0{\\n\\\n",
3781 " Comment:\"#\":\"$\"::Comment::\\n\\\n",
3782 " Loop Header:\"^[ \\\\t]*loop:\":::Loop::\\n\\\n",
3784 " nedit.languageModes: My Language:.my::::::\n",
3785 " nedit.styles: Loop:blue:Bold\n",
3787 "Resources are in the format of X resource files, but the format of text ",
3788 "within multiple-item resources like highlight patterns, language modes, ",
3789 "macros, styles, etc., are private to NEdit. Each resource is a string which ",
3790 "ends at the first newline character not escaped with \\, so you must be ",
3791 "careful about how you treat ends of lines. While you can generally just cut ",
3792 "and paste indented sections, if something which was originally in the middle ",
3793 "of a resource string is now at the end, you must remove the \\ line ",
3794 "continuation character(s) so it will not join the next line into the ",
3795 "resource. Conversely, if something which was originally at the end of a ",
3796 "resource is now in the middle, you'll have to add continuation character(s) ",
3797 "to make sure that the resource string is properly continued from beginning to ",
3798 "end, and possibly newline character(s) (\\n) to make sure that it is properly ",
3799 "separated from the next item. ",
3803 static char * htxt_resources
[] = {
3804 "\01INEdit has additional options to those provided in the Preferences menu which ",
3805 "are set using X resources. Like most other X programs, NEdit can be ",
3806 "customized to vastly unnecessary proportions, from initial window positions ",
3807 "down to the font and shadow colors of each individual button (A complete ",
3808 "discussion of how to do this is left to books on the X Window System). Key ",
3809 "binding (see \"\01QKey Binding\01I\" is one of the most useful of these resource ",
3810 "settable options. ",
3812 "X resources are usually specified in a file called .Xdefaults or .Xresources ",
3813 "in your home directory (on VMS this is sys$login:decw$xdefaults.dat). On ",
3814 "some systems, this file is read and its information attached to the X server ",
3815 "(your screen) when you start X. On other systems, the .Xdefaults file is ",
3816 "read each time you run an X program. When X resource values are attached to ",
3817 "the X server, changes to the resource file are not available to application ",
3818 "programs until you either run the xrdb program with the appropriate file as ",
3819 "input, or re-start the X server. ",
3821 "\01RSelected X Resource Names\01I",
3823 "The following are selected NEdit resource names and default values for NEdit ",
3824 "options not settable via the Preferences menu (for preference resource names, ",
3825 "see your NEdit preference file): ",
3827 "\01A\01Bnedit.tagFile\01A: (not defined) \n",
3829 "This can be the name of a file, or multiple files separated by a colon (:) ",
3830 "character, of the type produced by Exuberant Ctags or the Unix ctags ",
3831 "command, which NEdit will load at startup time (see \01Qctag support\01I ). The tag ",
3832 "file provides a database from which NEdit can automatically open files ",
3833 "containing the definition of a particular subroutine or data type. ",
3835 "\01A\01Bnedit.alwaysCheckRelativeTagsSpecs: True\01A\n",
3837 "When this resource is set to True, and there are tag files specified (with ",
3838 "the nedit.tagFile resource, see above) as relative paths, NEdit will evaluate ",
3839 "these tag value paths whenever a file is opened. All accessible tag files ",
3840 "will be loaded at this time. When this resource value is False, relative path ",
3841 "tag specifications will only be evaluated at NEdit startup time. ",
3843 "\01A\01Bnedit.shell\01A: /bin/csh \n",
3845 "(Unix systems only) The Unix shell (command interpreter) to use for executing ",
3846 "commands from the Shell menu ",
3848 "\01A\01Bnedit.wordDelimiters\01A: .,/\\\\`'!@#%^&*()-=+{}[]\":;<>?\n",
3850 "The characters, in addition to blanks and tabs, which mark the boundaries ",
3851 "between words for the move-by-word (Ctrl+Arrow) and select-word (double ",
3852 "click) commands. Note that this default value may be overridden by the ",
3853 "setting in Preferences -> Default Settings -> Language Modes.... ",
3855 "\01A\01Bnedit.remapDeleteKey\01A: False\n",
3857 "Setting this resource to True forcibly maps the delete key to backspace. This ",
3858 "can be helpful on systems where the bindings have become tangled, and in ",
3859 "environments which mix systems with PC style keyboards and systems with DEC ",
3860 "and Macintosh keyboards. Theoretically, these bindings should be made using ",
3861 "the standard X/Motif mechanisms, outside of NEdit. In practice, some ",
3862 "environments where users access several different systems remotely, can be ",
3863 "very hard to configure. If you've given up and are using a backspace key ",
3864 "halfway off the keyboard because you can't figure out the bindings, set this ",
3867 "\01A\01Bnedit.typingHidesPointer\01A: False\n",
3869 "Setting this resource to True causes the mouse pointer to be hidden when you ",
3870 "type in the text area. As soon as the mouse pointer is moved, it will ",
3871 "reappear. This is useful to stop the mouse pointer from obscuring text. ",
3873 "\01A\01Bnedit.overrideDefaultVirtualKeyBindings\01A: Auto\n",
3875 "Motif uses a virtual key binding mechanism that shares the bindings between ",
3876 "different Motif applications. When a first Motif application is started, it ",
3877 "installs some default virtual key bindings and any other Motif application ",
3878 "that runs afterwards, simply reuses them. Obviously, if the first ",
3879 "application installs an invalid set, all others applications may have ",
3882 "In the past, NEdit has been the victim of invalid bindings installed by other ",
3883 "applications several times. Through this resource, NEdit can be instructed ",
3884 "to ignore the bindings installed by other applications, and use its own ",
3885 "private bindings. By default, NEdit tries to detect invalid bindings ",
3886 "and ignore them automatically (Auto). Optionally, NEdit can be told to ",
3887 "always keep the installed bindings (Never), or to always override them ",
3890 "\01A\01Bnedit.stdOpenDialog\01A: False\n",
3892 "Setting this resource to True restores the standard Motif style of Open ",
3893 "dialog. NEdit file open dialogs are missing a text field at the bottom of ",
3894 "the dialog, where the file name can be entered as a string. The field is ",
3895 "removed in NEdit to encourage users to type file names in the list, a ",
3896 "non-standard, but much faster method for finding files. ",
3898 "\01A\01Bnedit.bgMenuButton\01A: ~Shift~Ctrl~Meta~Alt<Btn3Down>\n",
3900 "Specification for mouse button / key combination to post the background menu ",
3901 "(in the form of an X translation table event specification). The event ",
3902 "specification should be as specific as possible, since it will override less ",
3903 "specific translation table entries. ",
3905 "\01A\01Bnedit.maxPrevOpenFiles\01A: 30\n",
3907 "Number of files listed in the Open Previous sub-menu of the File menu. ",
3908 "Setting this to zero disables the Open Previous menu item and maintenance of ",
3909 "the NEdit file history file. ",
3911 "\01A\01Bnedit.printCommand\01A: (system specific)\n",
3913 "Command used by the print dialog to print a file, such as, lp, lpr, etc.. ",
3914 "The command must be capable of accepting input via stdin (standard input). ",
3916 "\01A\01Bnedit.printCopiesOption\01A: (system specific)\n",
3918 "Option name used to specify multiple copies to the print command. If the ",
3919 "option should be separated from its argument by a space, leave a trailing ",
3920 "space. If blank, no \"Number of Copies\" item will appear in the print dialog. ",
3922 "\01A\01Bnedit.printQueueOption\01A: (system specific)\n",
3924 "Option name used to specify a print queue to the print command. If the ",
3925 "option should be separated from its argument by a space, leave a trailing ",
3926 "space. If blank, no \"Queue\" item will appear in the print dialog. ",
3928 "\01A\01Bnedit.printNameOption\01A: (system specific)\n",
3930 "Option name used to specify a job name to the print command. If the option ",
3931 "should be separated from its argument by a space, leave a trailing space. If ",
3932 "blank, no job or file name will be attached to the print job or banner page. ",
3934 "\01A\01Bnedit.printHostOption\01A: (system specific)\n",
3936 "Option name used to specify a host name to the print command. If the option ",
3937 "should be separated from its argument by a space, leave a trailing space. If ",
3938 "blank, no \"Host\" item will appear in the print dialog. ",
3940 "\01A\01Bnedit.printDefaultQueue\01A: (system specific)\n",
3942 "The name of the default print queue. Used only to display in the print ",
3943 "dialog, and has no effect on printing. ",
3945 "\01A\01Bnedit.printDefaultHost\01A: (system specific)\n",
3947 "The node name of the default print host. Used only to display in the print ",
3948 "dialog, and has no effect on printing. ",
3950 "\01A\01Bnedit.visualID\01A: Best\n",
3952 "If your screen supports multiple visuals (color mapping models), this ",
3953 "resource allows you to manually choose among them. The default value of ",
3954 "\"Best\" chooses the deepest (most colors) visual available. Since NEdit does ",
3955 "not depend on the specific characteristics of any given color model, Best ",
3956 "probably IS the best choice for everyone, and the only reason for setting ",
3957 "this resource would be to patch around some kind of X server problem. The ",
3958 "resource may also be set to \"Default\", which chooses the screen's default ",
3959 "visual (often a color-mapped, PseudoColor, visual for compatibility with ",
3960 "older X applications). It may also be set to a numeric visual-id value (use ",
3961 "xdpyinfo to see the list of visuals supported by your display), or a visual ",
3962 "class name: PseudoColor, DirectColor, TrueColor, etc.. ",
3964 "If you are running under a themed environment (like KDE or CDE) that places ",
3965 "its colors in a shallow visual, and you'd rather have that color scheme ",
3966 "instead of more colors available, then you may need set the visual to ",
3967 "\"Default\" so that NEdit doesn't choose one with more colors. (The reason ",
3968 "for this is: if the \"best\" visual is not the server's default, then NEdit ",
3969 "cannot use the colors provided by your environment. NEdit will fall back to ",
3970 "its own default color scheme.) ",
3972 "\01A\01Bnedit.installColormap\01A: False\n",
3974 "Force the installation of a private colormap. If you have a humble 8-bit ",
3975 "color display, and netscape is hogging all of the color cells, you may want ",
3976 "to try turning this on. On most systems, this will result in colors flashing ",
3977 "wildly when you switch between NEdit and other applications. But a few ",
3978 "systems (SGI) have hardware support for multiple simultaneous colormaps, and ",
3979 "applications with installed colormaps are well behaved. ",
3981 "\01A\01Bnedit.findReplaceUsesSelection\01A: False\n",
3983 "Controls if the Find and Replace dialogs are automatically loaded with the ",
3984 "contents of the primary selection. ",
3986 "\01A\01Bnedit.stickyCaseSenseButton\01A: True\n",
3988 "Controls if the \"Case Sensitive\" buttons in the Find and Replace dialogs and ",
3989 "the incremental search bar maintain a separate state for literal and regular ",
3990 "expression searches. Moreover, when set to True, by default literal searches ",
3991 "are case insensitive and regular expression searches are case sensitive. When ",
3992 "set to False, the \"Case Sensitive\" buttons are independent of the \"Regular ",
3993 "Expression\" toggle. ",
3995 "\01A\01Bnedit.multiClickTime\01A: (system specific)\n",
3997 "Maximum time in milliseconds allowed between mouse clicks within double and ",
3998 "triple click actions. ",
4000 "\01A\01Bnedit.undoModifiesSelection\01A: True\n",
4002 "By default, NEdit selects any text inserted or changed through a undo/redo ",
4003 "action. Set this resource to False if you don't want your selection to be ",
4006 "\01A\01Bnedit*scrollBarPlacement\01A: BOTTOM_RIGHT\n",
4008 "How scroll bars are placed in NEdit windows, as well as various lists and ",
4009 "text fields in the program. Other choices are: BOTTOM_LEFT, TOP_LEFT, or ",
4012 "\01A\01Bnedit*text.autoWrapPastedText\01A: False\n",
4014 "When Auto Newline Wrap is turned on, apply automatic wrapping (which ",
4015 "normally only applies to typed text) to pasted text as well. ",
4017 "\01A\01Bnedit*text.heavyCursor\01A: False\n",
4019 "For monitors with poor resolution or users who have difficulty seeing the ",
4020 "cursor, makes the cursor in the text editing area of the window heavier and ",
4023 "\01A\01Bnedit.autoScrollVPadding\01A: 4\n",
4025 "Number of lines to keep the cursor away from the top or bottom line of the ",
4026 "window when the \"Auto-Scroll Near Window Top/Bottom\" feature is enabled. ",
4027 "Keyboard operations that would cause the cursor to get closer than ",
4028 "this distance cause the window to scroll up or down instead, except at the ",
4029 "beginning of the file. Mouse operations are not affected. ",
4031 "\01A\01Bnedit*text.blinkRate\01A: 500\n",
4033 "Blink rate of the text insertion cursor in milliseconds. Set to zero to stop ",
4036 "\01A\01Bnedit*text.Translations\01A:\n",
4038 "Modifies key bindings (see \"\01QKey Binding\01I\"). ",
4040 "\01A\01Bnedit*foreground\01A: black\n",
4042 "Default foreground color for menus, dialogs, scroll bars, etc.. ",
4044 "\01A\01Bnedit*background\01A: #b3b3b3\n",
4046 "Default background color for menus, dialogs, scroll bars, etc.. ",
4048 "\01A\01Bnedit*calltipForeground\01A: black\n",
4050 "Foreground color for calltips ",
4052 "\01A\01Bnedit*calltipBackground\01A: LemonChiffon1\n",
4054 "Background color for calltips ",
4056 "\01A\01Bnedit*XmLFolder.inactiveForeground\01A: #666\n",
4058 "Foreground color for inactive tabs. ",
4060 "\01A\01Bnedit*fontList\01A: helvetica medium 12 points\n",
4062 "Default font for menus, dialogs, scroll bars, etc.. ",
4064 "\01A\01Bnedit.helpFont\01A: helvetica medium 12 points\n",
4066 "Font used for displaying online help. ",
4068 "\01A\01Bnedit.boldHelpFont\01A: helvetica bold 12 points\n",
4070 "Bold font for online help. ",
4072 "\01A\01Bnedit.italicHelpFont\01A: helvetica italic 12 points\n",
4074 "Italic font for online help. ",
4076 "\01A\01Bnedit.fixedHelpFont\01A: courier medium 12 points\n",
4078 "Fixed font for online help. ",
4080 "\01A\01Bnedit.boldFixedHelpFont\01A: courier bold 12 points\n",
4082 "Fixed bold for online help. ",
4084 "\01A\01Bnedit.italicFixedHelpFont\01A: courier italic 12 points\n",
4086 "Fixed italic font for online help. ",
4088 "\01A\01Bnedit.h1HelpFont\01A: helvetica bold 14 points\n",
4090 "Font for level-1 titles in help text. ",
4092 "\01A\01Bnedit.h2HelpFont\01A: helvetica bold italic 12 points\n",
4094 "Font for level-2 titles in help text. ",
4096 "\01A\01Bnedit.h3HelpFont\01A: courier bold 12 points\n",
4098 "Font for level-3 titles in help text. ",
4100 "\01A\01Bnedit.helpLinkFont\01A: helvetica medium 12 points\n",
4102 "Font for hyperlinks in the help text ",
4104 "\01A\01Bnedit.helpLinkColor\01A: #009900\n",
4106 "Color for hyperlinks in the help text ",
4108 "\01A\01Bnedit.backlightCharTypes\01A: 0-8,10-31,127:red;9:#dedede;32,160-255:#f0f0f0;128-159:orange\n",
4110 "\01JNOTE: backlighting is \01Lexperimental\01J\01I (see \"\01QProgramming with NEdit\01I\"). ",
4112 "A string specifying character classes as ranges of ASCII values followed by ",
4113 "the color to be used as their background colors. The format is: ",
4115 "low[-high]{,low[-high]}:color{;low-high{,low[-high]}:color} ",
4117 "where low and high are ASCII values. ",
4120 "\01A 32-255:#f0f0f0;1-31,127:red;128-159:orange;9-13:#e5e5e5\n",
4122 "\01A\01Bnedit.focusOnRaise\01A: False\n",
4124 "This resource determines whether new text windows and text windows that are ",
4125 "raised, should also request the input focus. Conventionally, it is the task ",
4126 "of the window manager to decide on which window gets the input focus. ",
4127 "Therefore, NEdit's default behaviour is not to request the input focus ",
4130 "\01A\01Bnc.autoStart\01A: True \n",
4132 "Whether the nc program should automatically start an NEdit server (without ",
4133 "prompting the user) if an appropriate server is not found. ",
4135 "\01A\01Bnc.serverCommand\01A: nedit -server\n",
4137 "Command used by the nc program to start an NEdit server. ",
4139 "\01A\01Bnc.timeOut\01A: 10\n",
4141 "Basic time-out period used in communication with an NEdit server (seconds). ",
4143 "\01KThe following are Selected widget names (to which you may append\01I ",
4144 "\01K.background, .foreground, .fontList, etc., to change colors, fonts\01I ",
4145 "\01K and other characteristics):\01I ",
4147 "\01A\01Bnedit*statsAreaForm\01A\n",
4149 "Statistics line and incremental search bar. To get consistent results across ",
4150 "the entire stats line and the incremental search bar, use '*' rather than '.' ",
4151 "to separate the resource name. For example, to set the foreground color of ",
4152 "both components use: ",
4153 "\01A nedit*statsAreaForm*foreground\n",
4155 "\01A nedit*statsAreaForm.foreground\n",
4157 "\01A\01Bnedit*menuBar\01A\n",
4159 "Top-of-window menu-bar. ",
4161 "\01A\01Bnedit*textHorScrollBar\01A\n",
4163 "Horizontal scroll bar. ",
4165 "\01A\01Bnedit*textVertScrollBar\01A\n",
4167 "Vertical scroll bar. ",
4171 static char * htxt_binding
[] = {
4172 "\01IThere are several ways to change key bindings in NEdit. The easiest way to ",
4173 "add a new key binding in NEdit is to define a macro in Preferences -> Default ",
4174 "Settings -> Customize Menus -> Macro Menu. However, if you want to change ",
4175 "existing bindings or add a significant number of new key bindings you will ",
4176 "need to do so via X resources. ",
4178 "Before reading this section, you must understand how to set X resources (see ",
4179 "the help section \"\01QX Resources\01I\"). Since setting X resources is tricky, it is ",
4180 "also helpful when working on key-binding, to set some easier-to-verify ",
4181 "resource at the same time, as a simple check that the NEdit program is ",
4182 "actually seeing your changes. The appres program is also very helpful in ",
4183 "checking that the resource settings that you make, actually reach the program ",
4184 "for which they are intended in the correct form. ",
4186 "\01RKey Binding in General\01I",
4188 "Keyboard commands are associated with editor action routines through two ",
4189 "separate mechanisms in NEdit. Commands which appear in pull-down menus have ",
4190 "individual resources designating a keyboard equivalent to the menu command, ",
4191 "called an accelerator key. Commands which do not have an associated menu ",
4192 "item are bound to keys via the X toolkit translation mechanism. The methods ",
4193 "for changing these two kinds of bindings are quite different. ",
4195 "\01RKey Binding Via Translations\01I",
4197 "The most general way to bind actions to keys in NEdit is to use the ",
4198 "translation table associated with the text widget. To add a binding to Alt+Y ",
4199 "to insert the string \"Hi!\", for example, add lines similar to the following ",
4200 "to your X resource file: ",
4202 "\01A NEdit*text.Translations: #override \\n\\\n",
4203 " Alt<Key>y: insert_string(\"Hi!\") \\n\n",
4205 "The Help topic \"\01QAction Routines\01I\" lists the actions available to be bound. ",
4207 "Translation tables map key and mouse presses, window operations, and other ",
4208 "kinds of events, to actions. The syntax for translation tables is ",
4209 "simplified here, so you may need to refer to a book on the X window system ",
4210 "for more detailed information. ",
4212 "Note that accelerator resources (discussed below) override translations, and ",
4213 "that most Ctrl+letter and Alt+letter combinations are already bound to an ",
4214 "accelerator key. To use one of these combinations from a translation table, ",
4215 "therefore, you must first un-bind the original menu accelerator. ",
4217 "A resource for changing a translation table consists of a keyword; #override, ",
4218 "#augment, or #replace; followed by lines (separated by newline characters) ",
4219 "pairing events with actions. Events begin with modifiers, like Ctrl, Shift, ",
4220 "or Alt, followed by the event type in <>. BtnDown, Btn1Down, Btn2Down, ",
4221 "Btn1Up, Key, KeyUp are valid event types. For key presses, the event type is ",
4222 "followed by the name of the key. You can specify a combination of events, ",
4223 "such as a sequence of key presses, by separating them with commas. The other ",
4224 "half of the event/action pair is a set of actions. These are separated from ",
4225 "the event specification by a colon and from each other by spaces. Actions ",
4226 "are names followed by parentheses, optionally containing one or more ",
4227 "parameters separated by comas. ",
4229 "\01RChanging Menu Accelerator Keys\01I",
4231 "The menu shortcut keys shown at the right of NEdit menu items can also be ",
4232 "changed via X resources. Each menu item has two resources associated with ",
4233 "it, accelerator, the event to trigger the menu item; and acceleratorText, the ",
4234 "string shown in the menu. The form of the accelerator resource is the same ",
4235 "as events for translation table entries discussed above, though multiple keys ",
4236 "and other subtleties are not allowed. The resource name for a menu is the ",
4237 "title in lower case, followed by \"Menu\", the resource name of menu item is ",
4238 "the name in lower case, run together, with words separated by caps, and all ",
4239 "punctuation removed. For example, to change Cut to Ctrl+X, you would add the ",
4240 "following to your .Xdefaults file: ",
4242 "\01A nedit*editMenu.cut.accelerator: Ctrl<Key>x\n",
4243 " nedit*editMenu.cut.acceleratorText: Ctrl+X\n",
4245 "Accelerator keys with optional shift key modifiers, like Find..., have an ",
4246 "additional accelerator resource with Shift appended to the name. For ",
4249 "\01A nedit*searchMenu.find.acceleratorText: [Shift]Alt+F\n",
4250 " nedit*searchMenu.find.accelerator: Alt<Key>f\n",
4251 " nedit*searchMenu.findShift.accelerator: Shift Alt<Key>f\n",
4255 static char * htxt_patterns
[] = {
4256 "\01RWriting Syntax Highlighting Patterns\01I",
4258 "Patterns are the mechanism by which language syntax highlighting is ",
4259 "implemented in NEdit (see \01QSyntax Highlighting\01I under the heading of Features ",
4260 "for Programming). To create syntax highlighting patterns for a new ",
4261 "language, or to modify existing patterns, select \"Recognition Patterns\" from ",
4262 "\"Syntax Highlighting\" sub-section of the \"Default Settings\" sub-menu of the ",
4263 "\"Preferences\" menu. ",
4265 "First, a word of caution. As with regular expression matching in general, it ",
4266 "is quite possible to write patterns which are so inefficient that they ",
4267 "essentially lock up the editor as they recursively re-examine the entire ",
4268 "contents of the file thousands of times. With the multiplicity of patterns, ",
4269 "the possibility of a lock-up is significantly increased in syntax ",
4270 "highlighting. When working on highlighting patterns, be sure to save your ",
4271 "work frequently. ",
4273 "NEdit's syntax highlighting is unusual in that it works in real-time (as you ",
4274 "type), and yet is completely programmable using standard regular expression ",
4275 "notation. Other syntax highlighting editors usually fall either into the ",
4276 "category of fully programmable but unable to keep up in real-time, or ",
4277 "real-time but limited programmability. The additional burden that NEdit ",
4278 "places on pattern writers in order to achieve this speed/flexibility mix, is ",
4279 "to force them to state self-imposed limitations on the amount of context that ",
4280 "patterns may examine when re-parsing after a change. While the \"Pattern ",
4281 "Context Requirements\" heading is near the end of this section, it is not ",
4282 "optional, and must be understood before making any any serious effort at ",
4283 "pattern writing. ",
4285 "In its simplest form, a highlight pattern consists of a regular expression to ",
4286 "match, along with a style representing the font an color for displaying any ",
4287 "text which matches that expression. To bold the word, \"highlight\", wherever ",
4288 "it appears the text, the regular expression simply would be the word ",
4289 "\"highlight\". The style (selected from the menu under the heading of ",
4290 "\"Highlight Style\") determines how the text will be drawn. To bold the text, ",
4291 "either select an existing style, such as \"Keyword\", which bolds text, or ",
4292 "create a new style and select it under Highlight Style. ",
4294 "The full range of regular expression capabilities can be applied in such a ",
4295 "pattern, with the single caveat that the expression must conclusively match ",
4296 "or not match, within the pre-defined context distance (as discussed below ",
4297 "under Pattern Context Requirements). ",
4299 "To match longer ranges of text, particularly any constructs which exceed the ",
4300 "requested context, you must use a pattern which highlights text between a ",
4301 "starting and ending regular expression match. To do so, select \"Highlight ",
4302 "text between starting and ending REs\" under \"Matching\", and enter both a ",
4303 "starting and ending regular expression. For example, to highlight everything ",
4304 "between double quotes, you would enter a double quote character in both the ",
4305 "starting and ending regular expression fields. Patterns with both a ",
4306 "beginning and ending expression span all characters between the two ",
4307 "expressions, including newlines. ",
4309 "Again, the limitation for automatic parsing to operate properly is that both ",
4310 "expressions must match within the context distance stated for the pattern ",
4313 "With the ability to span large distances, comes the responsibility to recover ",
4314 "when things go wrong. Remember that syntax highlighting is called upon to ",
4315 "parse incorrect or incomplete syntax as often as correct syntax. To stop a ",
4316 "pattern short of matching its end expression, you can specify an error ",
4317 "expression, which stops the pattern from gobbling up more than it should. ",
4318 "For example, if the text between double quotes shouldn't contain newlines, ",
4319 "the error expression might be \"$\". As with both starting and ending ",
4320 "expressions, error expressions must also match within the requested context ",
4323 "\01SColoring Sub-Expressions\01I",
4325 "It is also possible to color areas of text within a regular expression ",
4326 "match. A pattern of this type associates a style with sub-expressions ",
4327 "references of the parent pattern (as used in regular expression substitution ",
4328 "patterns, see the NEdit Help menu item on Regular Expressions). ",
4329 "Sub-expressions of both the starting and ending patterns may be colored. For ",
4330 "example, if the parent pattern has a starting expression \"\\<\", and end ",
4331 "expression \"\\>\", (for highlighting all of the text contained within angle ",
4332 "brackets), a sub-pattern using \"&\" in both the starting and ending expression ",
4333 "fields could color the brackets differently from the intervening text. A ",
4334 "quick shortcut to typing in pattern names in the Parent Pattern field is to ",
4335 "use the middle mouse button to drag them from the Patterns list. ",
4337 "In some cases, there can be interference between coloring sub-patterns and ",
4338 "hierarchical sub-patterns (disscussed next). How this is resolved, is ",
4339 "explained below. ",
4341 "\01SHierarchical Patterns\01I",
4343 "A hierarchical sub-pattern, is identical to a top level pattern, but is ",
4344 "invoked only between the starting and ending expression matches of its ",
4345 "parent pattern or, in case the parent pattern consists of a single ",
4346 "expression, inside the text area matching that expression. Like the ",
4347 "sub-expression coloring patterns discussed above, it is associated with a ",
4348 "parent pattern using the Parent Pattern field in the pattern specification. ",
4349 "Pattern names can be dragged from the pattern list with the middle mouse ",
4350 "button to the Parent Pattern field. ",
4352 "The matching behaviour for sub-patterns is slightly different, depending on ",
4353 "whether the parent pattern consists of a single expression or has both a ",
4354 "starting and an ending expression. ",
4356 "In case the parent pattern consists of a single expression, and the syntax ",
4357 "highlighting parser finds a match for that expression, sub-patterns are ",
4358 "matched between the start and the end of the parent match. Sub-patterns ",
4359 "cannot extend beyond the boundaries of the parent's match nor can they ",
4360 "affect those boundaries (the latter can happen for starting/ending parent ",
4361 "patterns, see below). Note that sub-patterns can \01Kpeek\01I beyond the ",
4362 "parent's matching boundaries by means of look-ahead or look-behind ",
4365 "In case the parent pattern is a starting/ending style pattern, after the ",
4366 "start expression of the parent pattern matches, the syntax highlighting ",
4367 "parser searches for either the parent's end pattern or a matching ",
4368 "sub-pattern. When a sub-pattern matches, control is not returned to the ",
4369 "parent pattern until the entire sub-pattern has been parsed, regardless of ",
4370 "whether the parent's end pattern appears in the text matched by the ",
4371 "sub-pattern. In this way, matching of the parent's ending pattern can be ",
4372 "postponed, in contrast to the case where the parent pattern consists of a ",
4373 "single expression. Note that, in this case, parsing of sub-patterns starts ",
4374 "\01Jafter\01I the match of the parent pattern's starting expression, also in ",
4375 "contrast to the single-expression case. ",
4377 "The most common use for this capability is for coloring sub-structure of ",
4378 "language constructs (smaller patterns embedded in larger patterns). ",
4379 "Hierarchical patterns can also simplify parsing by having sub-patterns \"hide\" ",
4380 "special syntax from parent patterns, such as special escape sequences or ",
4381 "internal comments. ",
4383 "There is no depth limit in nesting hierarchical sub-patterns, but beyond the ",
4384 "third level of nesting, automatic re-parsing will sometimes have to re-parse ",
4385 "more than the requested context distance to guarantee a correct parse (which ",
4386 "can slow down the maximum rate at which the user can type if large sections ",
4387 "of text are matched only by deeply nested patterns). ",
4389 "While this is obviously not a complete hierarchical language parser it is ",
4390 "still useful in many text coloring situations. As a pattern writer, your ",
4391 "goal is not to completely cover the language syntax, but to generate ",
4392 "colorings that are useful to the programmer. Simpler patterns are usually ",
4393 "more efficient and also more robust when applied to incorrect code. ",
4395 "Note that in case of a single-expression parent pattern, there is a ",
4396 "potential for conflicts between coloring-only sub-patterns and hierarchical ",
4397 "sub-patterns (which cannot happen for starting/ending type of patterns, ",
4398 "because sub-patterns are matched \01Jbetween\01I the starting and ending pattern ",
4399 "(not included)). Due to the different nature of these two kinds of ",
4400 "sub-patterns, it is technically infeasible to follow the standard matching ",
4401 "precedence rules, where a sub-pattern has precedence over the sub-patterns ",
4402 "following it. Instead, coloring-only sub-patterns are always colored last, ",
4403 "ie., they may override the coloring for overlapping sibling sub-patterns in ",
4404 "the overlapping parts of the matches. ",
4406 "\01SDeferred (Pass-2) Parsing\01I",
4408 "NEdit does pattern matching for syntax highlighting in two passes. The first ",
4409 "pass is applied to the entire file when syntax highlighting is first turned ",
4410 "on, and to new ranges of text when they are initially read or pasted in. The ",
4411 "second pass is applied only as needed when text is exposed (scrolled in to ",
4414 "If you have a particularly complex set of patterns, and parsing is beginning ",
4415 "to add a noticeable delay to opening files or operations which change large ",
4416 "regions of text, you can defer some of that parsing from startup time, to ",
4417 "when it is actually needed for viewing the text. Deferred parsing can only ",
4418 "be used with single expression patterns, or begin/end patterns which match ",
4419 "entirely within the requested context distance. To defer the parsing of a ",
4420 "pattern to when the text is exposed, click on the Pass-2 pattern type button ",
4421 "in the highlight patterns dialog. ",
4423 "Sometimes a pattern can't be deferred, not because of context requirements, ",
4424 "but because it must run concurrently with pass-1 (non-deferred) patterns. If ",
4425 "they didn't run concurrently, a pass-1 pattern might incorrectly match some ",
4426 "of the characters which would normally be hidden inside of a sequence matched ",
4427 "by the deferred pattern. For example, C has character constants enclosed in ",
4428 "single quotes. These typically do not cross line boundaries, meaning they ",
4429 "can be parsed entirely within the context distance of the C pattern set and ",
4430 "should be good candidates for deferred parsing. However, they can't be ",
4431 "deferred because they can contain sequences of characters which can trigger ",
4432 "pass-one patterns. Specifically, the sequence, '\\\"', contains a double quote ",
4433 "character, which would be matched by the string pattern and interpreted as ",
4434 "introducing a string. ",
4436 "\01SPattern Context Requirements\01I",
4438 "The context requirements of a pattern set state how much additional text ",
4439 "around any change must be examined to guarantee that the patterns will match ",
4440 "what they are intended to match. Context requirements are a promise by NEdit ",
4441 "to the pattern writer, that the regular expressions in his/her patterns will ",
4442 "be matched against at least <line context> lines and <character context> ",
4443 "characters, around any modified text. Combining line and character ",
4444 "requirements guarantee that both will be met. ",
4446 "Automatic re-parsing happens on EVERY KEYSTROKE, so the amount of context ",
4447 "which must be examined is very critical to typing efficiency. The more ",
4448 "complicated your patterns, the more critical the context becomes. To cover ",
4449 "all of the keywords in a typical language, without affecting the maximum rate ",
4450 "at which users can enter text, you may be limited to just a few lines and/or ",
4451 "a few hundred characters of context. ",
4453 "The default context distance is 1 line, with no minimum character ",
4454 "requirement. There are several benefits to sticking with this default. One ",
4455 "is simply that it is easy to understand and to comply with. Regular ",
4456 "expression notation is designed around single line matching. To span lines ",
4457 "in a regular expression, you must explicitly mention the newline character ",
4458 "\"\\n\", and matches which are restricted to a single line are virtually immune ",
4459 "to lock-ups. Also, if you can code your patterns to work within a single ",
4460 "line of context, without an additional character-range context requirement, ",
4461 "the parser can take advantage the fact that patterns don't cross line ",
4462 "boundaries, and nearly double its efficiency over a one-line and 1-character ",
4463 "context requirement. (In a single line context, you are allowed to match ",
4464 "newlines, but only as the first and/or last character.) ",
4468 static char * htxt_smart_indent
[] = {
4469 "\01ISmart indent macros can be written for any language, but are usually more ",
4470 "difficult to write than highlighting patterns. A good place to start, of ",
4471 "course, is to look at the existing macros for C and C++. ",
4473 "Smart indent macros for a language mode consist of standard NEdit macro ",
4474 "language code attached to any or all of the following three activation ",
4475 "conditions: 1) When smart indent is first turned on for a text window ",
4476 "containing code of the language, 2) When a newline is typed and smart indent ",
4477 "is expected, 3) after any character is typed. To attach macro code to any of ",
4478 "these code \"hooks\", enter it in the appropriate section in the Preferences -> ",
4479 "Default Settings -> Auto Indent -> Program Smart Indent dialog. ",
4481 "Typically most of the code should go in the initialization section, because ",
4482 "that is the appropriate place for subroutine definitions, and smart indent ",
4483 "macros are complicated enough that you are not likely to want to write them ",
4484 "as one monolithic run of code. You may also put code in the Common/Shared ",
4485 "Initialization section (accessible through the button in the upper left ",
4486 "corner of the dialog). Unfortunately, since the C/C++ macros also reside in ",
4487 "the common/shared section, when you add code there, you run some risk of ",
4488 "missing out on future upgrades to these macros, because your changes will ",
4489 "override the built-in defaults. ",
4491 "The newline macro is invoked after the user types a newline, but before the ",
4492 "newline is entered in the buffer. It takes a single argument ($1) which is ",
4493 "the position at which the newline will be inserted. It must return the ",
4494 "number of characters of indentation the line should have, or -1. A return ",
4495 "value of -1 means to do a standard auto-indent. You must supply a newline ",
4496 "macro, but the code: \"return -1\" (auto-indent), or \"return 0\" (no indent) is ",
4499 "The type-in macro takes two arguments. $1 is the insert position, and $2 is ",
4500 "the character just inserted, and does not return a value. You can do just ",
4501 "about anything here, but keep in mind that this macro is executed for every ",
4502 "keystroke typed, so if you try to get too fancy, you may degrade performance. ",
4506 static char * htxt_command_line
[] = {
4508 "\01A \01Bnedit\01A [-\01Bread\01A] [-\01Bcreate\01A] [-\01Bline\01A n | +n] [-\01Bserver\01A]\n",
4509 " [-\01Bdo\01A command] [-\01Btags\01A file] [-\01Btabs\01A n] [-\01Bwrap\01A]\n",
4510 " [-\01Bnowrap\01A] [-\01Bautowrap\01A] [-\01Bautoindent\01A] [-\01Bnoautoindent\01A]\n",
4511 " [-\01Bautosave\01A] [-\01Bnoautosave\01A] [-\01Brows\01A n] [-\01Bcolumns\01A n]\n",
4512 " [-\01Bfont\01A font] [-\01Blm\01A languagemode] [-\01Bgeometry\01A geometry]\n",
4513 " [-\01Biconic\01A] [-\01Bnoiconic\01A] [-\01Bdisplay\01A [host]:server[.screen]\n",
4514 " [-\01Bxrm\01A resourcestring] [-\01Bsvrname\01A name] [-\01Bimport\01A file]\n",
4515 " [-\01Bbackground\01A color] [-\01Bforeground\01A color]\n",
4516 " [-\01Btabbed\01A] [-\01Buntabbed\01A] [-\01Bgroup\01A] [-\01BV\01A|-\01Bversion\01A]\n",
4517 " [--] [file...]\n",
4519 "\01A\01B-read\01A\n",
4520 "\01IOpen the file Read Only regardless of the actual file protection. ",
4522 "\01A\01B-create\01A\n",
4523 "\01IDon't warn about file creation when a file doesn't exist. ",
4525 "\01A\01B-line n (or +n)\01A\n",
4526 "\01IGo to line number n ",
4528 "\01A\01B-server\01A\n",
4529 "\01IDesignate this session as an NEdit server, for processing commands from the ",
4530 "nc program. nc can be used to interface NEdit to code development ",
4531 "environments, mailers, etc., or just as a quick way to open files from the ",
4532 "shell command line without starting a new NEdit session. ",
4534 "\01A\01B-do command\01A\n",
4535 "\01IExecute an NEdit macro or action on the file following the -do argument on ",
4536 "the command line. -do is particularly useful from the nc program, where ",
4537 "nc -do can remotely execute commands in an NEdit -server session. ",
4539 "\01A\01B-tags file\01A\n",
4540 "\01ILoad a file of directions for finding definitions of program subroutines and ",
4541 "data objects. The file must be of the format generated by Exuberant Ctags, ",
4542 "or the standard Unix ctags command. ",
4544 "\01A\01B-tabs n\01A\n",
4545 "\01ISet tab stops every n characters. ",
4547 "\01A\01B-wrap, -nowrap\01A\n",
4548 "\01IWrap long lines at the right edge of the window rather than continuing them ",
4549 "past it. (Continuous Wrap mode) ",
4551 "\01A\01B-autowrap, -noautowrap\01A\n",
4552 "\01IWrap long lines when the cursor reaches the right edge of the window by ",
4553 "inserting newlines at word boundaries. (Auto Newline Wrap mode) ",
4555 "\01A\01B-autoindent, -noautoindent\01A\n",
4556 "\01IMaintain a running indent. ",
4558 "\01A\01B-autosave, -noautosave\01A\n",
4559 "\01IMaintain a backup copy of the file being edited under the name '~filename'. ",
4561 "\01A\01B-rows n\01A\n",
4562 "\01IDefault height in characters for an editing window. ",
4564 "\01A\01B-columns n\01A\n",
4565 "\01IDefault width in characters for an editing window. ",
4567 "\01A\01B-font font (or -fn font)\01A\n",
4568 "\01IFont for text being edited (Font for menus and dialogs can be set with -xrm ",
4569 "\"*fontList:font\"). ",
4571 "\01A\01B-lm languagemode\01A\n",
4572 "\01IInitial language mode used for editing succeeding files. ",
4574 "\01A\01B-geometry geometry (or -g geometry)\01A\n",
4575 "\01IThe initial size and/or location of editor windows. The argument geometry ",
4578 "\01A [<width>x<height>][+|-][<xoffset>[+|-]<yoffset>]\n",
4580 "where <width> and <height> are the desired width and height of the window, ",
4581 "and <xoffset> and <yoffset> are the distance from the edge of the screen to ",
4582 "the window, + for top or left, - for bottom or right. -geometry can be ",
4583 "specified for individual files on the command line. ",
4585 "\01A\01B-iconic, -noiconic\01A\n",
4586 "\01IInitial window state for succeeding files. ",
4588 "\01A\01B-display [host]:server[.screen]\01A\n",
4589 "\01IThe name of the X server to use. host specifies the machine, server ",
4590 "specifies the display server number, and screen specifies the screen number. ",
4591 "host or screen can be omitted and default to the local machine, and screen 0. ",
4593 "\01A\01B-background color (or -bg color)\01A\n",
4594 "\01IUser interface background color. (Background color for text can be set ",
4595 "separately with -xrm \"nedit.textBgColor: color\" or using the Preferences -> ",
4598 "\01A\01B-foreground color (or -fg color)\01A\n",
4599 "\01IUser interface foreground color. (Foreground color for text can be set ",
4600 "separately with -xrm \"nedit.textFgColor: color\" or using the Preferences ",
4601 "-> Colors dialog). ",
4603 "\01A\01B-tabbed\01A\n",
4604 "\01IOpen all subsequent files in new tabs. Resets -group option. ",
4606 "\01A\01B-untabbed\01A\n",
4607 "\01IOpen all subsequent files in new windows. Resets -group option. ",
4609 "\01A\01B-group\01A\n",
4610 "\01IOpen all subsequent files as tabs in a new window. ",
4612 "\01A\01B-xrm resourcestring\01A \n",
4613 "\01ISet the value of an X resource to override a default ",
4614 "value (see \"\01QCustomizing NEdit\01I\"). ",
4616 "\01A\01B-svrname name\01A\n",
4617 "\01IWhen starting NEdit in server mode, name the server, such that it responds to ",
4618 "requests only when nc is given a corresponding -svrname argument. By naming ",
4619 "servers, you can run several simultaneously, and direct files and commands ",
4620 "specifically to any one. Specifying a non-empty name automatically designates ",
4621 "this session as an NEdit server, as though -server were specified. ",
4623 "\01A\01B-import file\01A\n",
4624 "\01ILoads an additional preferences file on top of the existing defaults saved in ",
4625 "your preferences file. To incorporate macros, language modes, and highlight ",
4626 "patterns and styles written by other users, run NEdit with -import <file>, ",
4627 "then re-save your preference file with Preferences -> Save Defaults. ",
4629 "\01A\01B-version\01A\n",
4630 "\01IPrints out the NEdit version information. The -V option is synonymous. ",
4633 "\01ITreats all subsequent arguments as file names, even if they start with a ",
4634 "dash. This is so NEdit can access files that begin with the dash character. ",
4637 "This documentation for VMS NEdit usage should only appear in the ",
4638 "generated help code, not in any of the printed documentation. ",
4639 "Reasoning is that VMS usage is diminishing and there is a desire ",
4640 "to not clutter up the printed documentation here. ",
4641 "NEDIT [filespec[,...]] ",
4643 "The following qualifiers are accepted: ",
4645 "\01A\01B/read\01A\n",
4646 "\01IOpen the file Read Only regardless of the actual file protection. ",
4648 "\01A\01B/create\01A\n",
4649 "\01IDon't warn about file creation when a file doesn't exist. ",
4651 "\01A\01B/line=n\01A\n",
4652 "\01IGo to line #n ",
4654 "\01A\01B/server\01A \n",
4655 "\01IDesignate this session as an NEdit server for processing commands from the nc ",
4656 "program. The nc program can be used to interface NEdit to code development ",
4657 "environments, mailers, etc., or just as a quick way to open files from the ",
4658 "shell command line without starting a new NEdit session. ",
4660 "\01A\01B/do=command\01A\n",
4661 "\01IExecute an NEdit action routine. on each file following the /do argument on ",
4662 "the command line. /do is particularly useful from the nc program, where nc ",
4663 "/do can remotely execute commands in an nedit /server session. ",
4665 "\01A\01B/tags=file\01A\n",
4666 "\01ILoad a file of directions for finding definitions of program subroutines and ",
4667 "data objects. The file must be of the format generated by the Unix ctags ",
4670 "\01A\01B/wrap, /nowrap\01A\n",
4671 "\01IWrap long lines at the right edge of the window rather than continuing them ",
4672 "past it. (Continuous Wrap mode) ",
4674 "\01A\01B/autowrap, /noautowrap\01A\n",
4675 "\01IWrap long lines when the cursor reaches the right edge of the window by ",
4676 "inserting newlines at word boundaries. (Auto Newline Wrap mode) ",
4678 "\01A\01B/autoindent, /noautoindent\01A\n",
4679 "\01IMaintain a running indent. ",
4681 "\01A\01B/autosave, /noautosave\01A\n",
4682 "\01IMaintain a backup copy of the file being edited under the name '_filename'. ",
4684 "\01A\01B/rows=n\01A\n",
4685 "\01IDefault width in characters for an editing window. ",
4687 "\01A\01B/columns=n\01A\n",
4688 "\01IDefault height in characters for an editing window. ",
4690 "\01A\01B/font=font (or /fn=font)\01A\n",
4691 "\01IFont for text being edited (Font for menus and dialogs can be set with ",
4692 "/xrm=\"*fontList:font\"). ",
4694 "\01A\01B/display [host]:server[.screen]\01A\n",
4695 "\01IThe name of the X server to use. host specifies the machine, server ",
4696 "specifies the display server number, and screen specifies the screen number. ",
4697 "host or screen can be omitted and default to the local machine, and screen 0. ",
4699 "\01A\01B/geometry=geometry (or /g=geometry)\01A\n",
4700 "\01IThe initial size and/or location of editor windows. The argument geometry ",
4703 "\01A [<width>x<height>][+|-][<xoffset>[+|-]<yoffset>]\n",
4705 "where <width> and <height> are the desired width and height of the window, ",
4706 "and <xoffset> and <yoffset> are the distance from the edge of the screen to ",
4707 "the window, + for top or left, - for bottom or right. ",
4709 "\01A\01B/background=color (or /bg=color)\01A\n",
4711 "Background color. (background color for text can be set separately with ",
4712 "/xrm=\"nedit:textBgColor color\" or using the Preferences -> ",
4715 "\01A\01B/foreground=color (or /fg=color)\01A\n",
4716 "\01IForeground color. (foreground color for text can be set separately with ",
4717 "/xrm=\"nedit:textFgColor color\" or using the Preferences -> ",
4720 "\01A\01B/tabbed\01A\n",
4721 "\01IOpen all subsequent files in new tabs. Resets /group option. ",
4723 "\01A\01B/untabbed\01A\n",
4724 "\01IOpen all subsequent files in new windows. Resets /group option. ",
4726 "\01A\01B/group\01A\n",
4727 "\01IOpen all subsequent files as tabs in a new window. ",
4729 "\01A\01B/xrm=resourcestring\01A\n",
4730 "\01ISet the value of an X resource to override a default value ",
4731 "(see Customizing NEdit). ",
4733 "\01A\01B/svrname=name\01A\n",
4734 "\01IWhen starting nedit in server mode, name the server, such that it responds to ",
4735 "requests only when nc is given a corresponding -svrname argument. By naming ",
4736 "servers, you can run several simultaneously, and direct files and commands ",
4737 "specifically to any one. ",
4739 "\01A\01B/import=file\01A\n",
4740 "\01ILoads an additional preferences file on top of the existing defaults saved in ",
4741 "your .nedit file. To incorporate macros, language modes, and highlight ",
4742 "patterns and styles written by other users, run nedit with /import=<file>, ",
4743 "then re-save your .nedit file with Preferences -> Save Defaults. ",
4745 "Unix-style command lines (but not file names) are also acceptable: ",
4747 "\01A nedit -rows 20 -wrap file1.c file2.c\n",
4749 "is equivalent to: ",
4751 "\01A nedit /rows=20/wrap file1.c, file2.c\",\n",
4756 static char * htxt_server
[] = {
4757 "\01INEdit can be operated on its own, or as a two-part client/server ",
4758 "application. Client/server mode is useful for integrating NEdit with ",
4759 "software development environments, mailers, and other programs; or just as a ",
4760 "quick way to open files from the shell command line without starting a new ",
4763 "To run NEdit in server mode, type: ",
4765 "\01A nedit -server\n",
4767 "NEdit can also be started in server mode via the NEdit Client program ",
4768 "(\01Jnc\01I) when no servers are available. ",
4770 "The nc program, which is distributed along with NEdit, sends commands to ",
4771 "an NEdit server to open files or execute editor actions. It can also be ",
4772 "used on files that are already opened. ",
4774 "Listing a file on the nc command line means: Open it if it is not already ",
4775 "open and bring the window to the front. ",
4777 "nc supports the following command line options: ",
4779 "\01A \01Bnc\01A [\01B-read\01A] [\01B-create\01A]\n",
4780 " [\01B-line\01A n | \01B+\01An] [\01B-do\01A command] [\01B-lm\01A languagemode]\n",
4781 " [\01B-svrname\01A name] [\01B-svrcmd\01A command]\n",
4782 " [\01B-ask\01A] [\01B-noask\01A] [\01B-timeout\01A seconds]\n",
4783 " [\01B-geometry\01A geometry | \01B-g\01A geometry] [\01B-icon\01A | \01B-iconic\01A]\n",
4784 " [-\01Btabbed\01A] [-\01Buntabbed\01A] [-\01Bgroup\01A] [\01B-wait\01A]\n",
4785 " [\01B-V\01A | \01B-version\01A]\n",
4786 " [\01B-xrm\01A resourcestring] [\01B-display\01A [host]:server[.screen]]\n",
4787 " [\01B-\01A-] [file...]\n",
4789 "\01A\01B-read\01A\n",
4790 "\01IOpen the file read-only regardless of its actual permissions. There is no ",
4791 "effect if the file is already open. ",
4793 "\01A\01B-create\01A\n",
4794 "\01IDon't warn about file creation when a file doesn't exist. ",
4796 "\01A\01B-line\01A n, \01B+\01An\n",
4797 "\01IGo to line number n. This will also affect files which are already open. ",
4799 "\01A\01B-do\01A command\n",
4800 "\01IExecute an NEdit macro or action on the file following the -do argument ",
4801 "on the command line. ",
4803 "If you use this command without a filename, nc would randomly choose one ",
4804 "window to focus and execute the macro in. ",
4806 "\01A\01B-ask\01A, \01B-noask\01A\n",
4807 "\01IInstructs nc to automatically start a server if one is not available. This ",
4808 "overrides the X resource `nc.autoStart' (see \01QX Resources\01I). ",
4810 "\01A\01B-svrname\01A name\n",
4811 "\01IExplicitly instructs nc which server to connect to, an instance of ",
4812 "nedit(1) with a corresponding -svrname argument. By naming servers, you ",
4813 "can run several simultaneously, and direct files and commands ",
4814 "specifically to any one. ",
4816 "\01A\01B-svrcmd\01A command\n",
4817 "\01IThe command which nc uses to start an NEdit server. It is also settable ",
4818 "via the X resource `nc.serverCommand' (see \01QX Resources\01I). Defaults to ",
4819 "\"nedit -server\". ",
4821 "\01A\01B-lm\01A languagemode\n",
4822 "\01IInitial language mode used. ",
4824 "\01A\01B-geometry\01A geometry, \01B-g\01A geometry\n",
4825 "\01IThe initial size and/or location of editor windows. See ",
4826 "\01QNEdit Command Line\01I for details. ",
4828 "\01A\01B-icon\01A, \01B-iconic\01A\n",
4829 "\01IInitial window state. ",
4831 "\01A\01B-display\01A [<host>]:<server>[.<screen>]\n",
4832 "\01IThe name of the X server to use. See \01QNEdit Command Line\01I for details. ",
4834 "\01A\01B-timeout\01A seconds\n",
4835 "\01IBasic time-out period used in communication with an NEdit server. The ",
4836 "default is 10 seconds. Also settable via the X resource `nc.timeOut'. ",
4838 "Under rare conditions (such as a slow connection), it may be necessary to ",
4839 "increase the time-out period. In most cases, the default is fine. ",
4841 "\01A\01B-tabbed\01A\n",
4842 "\01IOpen all subsequent files in new tabs. Resets -group option. ",
4844 "\01A\01B-untabbed\01A\n",
4845 "\01IOpen all subsequent files in new windows. Resets -group option. ",
4847 "\01A\01B-group\01A\n",
4848 "\01IOpen all subsequent files as tabs in a new window. ",
4850 "\01A\01B-wait\01A\n",
4851 "\01IInstructs nc not to return to the shell until all files given are closed. ",
4853 "Normally, nc returns once the files given in its command line are opened ",
4854 "by the server. When this option is given, nc returns only after the last ",
4855 "file given in this call is closed. ",
4857 "Note that this option affects all files in the command line, not only the ",
4858 "ones following this option. ",
4860 "Note that nc will wait for all files given in the command line, even if ",
4861 "the files were already opened. ",
4863 "\01SCommand Line Arguments\01I",
4865 "In typical Unix style, arguments affect the files which follow them on the ",
4866 "command line, for example: ",
4868 "\01A incorrect: nc file.c -line 25\n",
4869 " correct: nc -line 25 file.c\n",
4871 "-read, -create, and -line affect all of the files which follow them on the ",
4874 "The -do macro is executed only once, on the next file on the line. -do ",
4875 "without a file following it on the command line, executes the macro on the ",
4876 "first available window (presumably when you give a -do command without a ",
4877 "corresponding file or window, you intend it to do something independent of ",
4878 "the window in which it happens to execute). ",
4880 "The -wait option affects all files named in the command line. ",
4882 "\01SMultiple Servers\01I",
4884 "Sometimes it is useful to have more than one NEdit server running, for ",
4885 "example to keep mail and programming work separate. The option, -svrname, to ",
4886 "both nedit and nc, allows you to start, and communicate with, separate named ",
4887 "servers. A named server responds only to requests with the corresponding ",
4888 "-svrname argument. If you use ClearCase and are within a ClearCase view, the ",
4889 "server name will default to the name of the view (based on the value of the ",
4890 "CLEARCASE_ROOT environment variable). ",
4892 "\01SCommunication\01I",
4894 "Communication between nc and nedit is done through the X display. So as long ",
4895 "as the X Window System is set up and working properly, nc will work properly ",
4896 "as well. nc uses the DISPLAY environment variable, the machine name and your ",
4897 "user name to find the appropriate server, meaning, if you have several ",
4898 "machines sharing a common file system, nc will not be able to find a server ",
4899 "that is running on a machine with a different host name, even though it may ",
4900 "be perfectly appropriate for editing a given file. ",
4902 "The command which nc uses to start an nedit server is settable via the X ",
4903 "resource nc.serverCommand, by default, \"nedit -server\". ",
4907 static char * htxt_recovery
[] = {
4908 "\01IIf a system crash, network failure, X server crash, or program error should ",
4909 "happen while you are editing a file, you can still recover most of your ",
4910 "work. NEdit maintains a backup file which it updates periodically (every 8 ",
4911 "editing operations or 80 characters typed). This file has the same name ",
4912 "as the file that you are editing, but with the character `~' (tilde) on Unix ",
4913 "or `_' (underscore) on VMS prefixed to the name. To recover a file after a ",
4914 "crash, simply rename the file to remove the tilde or underscore character, ",
4915 "replacing the older version of the file. (Because several of the Unix shells ",
4916 "consider the tilde to be a special character, you may have to prefix the ",
4917 "character with a `\\' (backslash) when you move or delete an NEdit backup ",
4920 "Example, to recover the file called \"help.c\" on Unix type the command: ",
4922 "\01A mv \\~help.c help.c\n",
4924 "A minor caveat, is that if the file you were editing was in MS DOS format, ",
4925 "the backup file will be in Unix format, and you will need to open the backup ",
4926 "file in NEdit and change the file format back to MS DOS via the Save As... ",
4927 "dialog (or use the Unix unix2dos command outside of NEdit). ",
4931 static char * htxt_version
[] = {
4934 "NEdit was written by Mark Edel, Joy Kyriakopulos, Christopher Conrad, ",
4935 "Jim Clark, Arnulfo Zepeda-Navratil, Suresh Ravoor, Tony Balinski, Max ",
4936 "Vohlken, Yunliang Yu, Donna Reid, Arne Førlie, Eddy De Greef, Steve ",
4937 "LoBasso, Alexander Mai, Scott Tringali, Thorsten Haude, Steve Haehn, ",
4938 "Andrew Hood, Nathaniel Gray, and TK Soh. ",
4940 "The regular expression matching routines used in NEdit are adapted (with ",
4941 "permission) from original code written by Henry Spencer at the ",
4942 "University of Toronto. ",
4944 "The Microline widgets are inherited from the Mozilla project. ",
4946 "Syntax highlighting patterns and smart indent macros were contributed by: ",
4947 "Simon T. MacDonald, Maurice Leysens, Matt Majka, Alfred Smeenk, ",
4948 "Alain Fargues, Christopher Conrad, Scott Markinson, Konrad Bernloehr, ",
4949 "Ivan Herman, Patrice Venant, Christian Denat, Philippe Couton, ",
4950 "Max Vohlken, Markus Schwarzenberg, Himanshu Gohel, Steven C. Kapp, ",
4951 "Michael Turomsha, John Fieber, Chris Ross, Nathaniel Gray, Joachim Lous, ",
4952 "Mike Duigou, Seak Teng-Fong, Joor Loohuis, Mark Jones, ",
4953 "and Niek van den Berg. ",
4955 "NEdit sources, executables, additional documentation, and contributed ",
4956 "software are available from the NEdit web site at http://www.nedit.org. ",
4958 "This program is free software; you can redistribute it and/or ",
4959 "modify it under the terms of the \01QGNU General Public License\01I ",
4960 "as published by the Free Software Foundation; either version 2 ",
4961 "of the License, or (at your option) any later version. ",
4963 "In addition, as a special exception to the GNU GPL, the copyright holders ",
4964 "give permission to link the code of this program with the Motif and Open ",
4965 "Motif libraries (or with modified versions of these that use the same ",
4966 "license), and distribute linked combinations including the two. You must ",
4967 "obey the GNU General Public License in all respects for all of the code ",
4968 "used other than linking with Motif/Open Motif. If you modify this file, ",
4969 "you may extend this exception to your version of the file, but you are ",
4970 "not obligated to do so. If you do not wish to do so, delete this ",
4971 "exception statement from your version. ",
4973 "This program is distributed in the hope that it will be useful, ",
4974 "but WITHOUT ANY WARRANTY; without even the implied warranty of ",
4975 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ",
4976 "section on the \01QGNU General Public License\01I for more details. ",
4980 static char * htxt_distribution
[] = {
4981 "\01IGNU GENERAL PUBLIC LICENSE ",
4983 "Version 2, June 1991 ",
4985 "Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, ",
4986 "Cambridge, MA 02139, USA. Everyone is permitted to copy and distribute ",
4987 "verbatim copies of this license document, but changing it is not allowed. ",
4991 "The licenses for most software are designed to take away your freedom to ",
4992 "share and change it. By contrast, the GNU General Public License is intended ",
4993 "to guarantee your freedom to share and change free software--to make sure the ",
4994 "software is free for all its users. This General Public License applies to ",
4995 "most of the Free Software Foundation's software and to any other program ",
4996 "whose authors commit to using it. (Some other Free Software Foundation ",
4997 "software is covered by the GNU Library General Public License instead.) You ",
4998 "can apply it to your programs, too. ",
5000 "When we speak of free software, we are referring to freedom, not price. Our ",
5001 "General Public Licenses are designed to make sure that you have the freedom ",
5002 "to distribute copies of free software (and charge for this service if you ",
5003 "wish), that you receive source code or can get it if you want it, that you ",
5004 "can change the software or use pieces of it in new free programs; and that ",
5005 "you know you can do these things. ",
5007 "To protect your rights, we need to make restrictions that forbid anyone to ",
5008 "deny you these rights or to ask you to surrender the rights. These ",
5009 "restrictions translate to certain responsibilities for you if you distribute ",
5010 "copies of the software, or if you modify it. ",
5012 "For example, if you distribute copies of such a program, whether gratis or ",
5013 "for a fee, you must give the recipients all the rights that you have. You ",
5014 "must make sure that they, too, receive or can get the source code. And you ",
5015 "must show them these terms so they know their rights. ",
5017 "We protect your rights with two steps: (1) copyright the software, and (2) ",
5018 "offer you this license which gives you legal permission to copy, distribute ",
5019 "and/or modify the software. ",
5021 "Also, for each author's protection and ours, we want to make certain that ",
5022 "everyone understands that there is no warranty for this free software. If the ",
5023 "software is modified by someone else and passed on, we want its recipients to ",
5024 "know that what they have is not the original, so that any problems introduced ",
5025 "by others will not reflect on the original authors' reputations. ",
5027 "Finally, any free program is threatened constantly by software patents. We ",
5028 "wish to avoid the danger that redistributors of a free program will ",
5029 "individually obtain patent licenses, in effect making the program ",
5030 "proprietary. To prevent this, we have made it clear that any patent must be ",
5031 "licensed for everyone's free use or not licensed at all. ",
5033 "The precise terms and conditions for copying, distribution and modification ",
5036 "GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND ",
5039 "0. This License applies to any program or other work which contains a notice ",
5040 "placed by the copyright holder saying it may be distributed under the terms ",
5041 "of this General Public License. The \"Program\", below, refers to any such ",
5042 "program or work, and a \"work based on the Program\" means either the Program ",
5043 "or any derivative work under copyright law: that is to say, a work containing ",
5044 "the Program or a portion of it, either verbatim or with modifications and/or ",
5045 "translated into another language. (Hereinafter, translation is included ",
5046 "without limitation in the term \"modification\".) Each licensee is addressed as ",
5049 "Activities other than copying, distribution and modification are not covered ",
5050 "by this License; they are outside its scope. The act of running the Program ",
5051 "is not restricted, and the output from the Program is covered only if its ",
5052 "contents constitute a work based on the Program (independent of having been ",
5053 "made by running the Program). Whether that is true depends on what the ",
5056 "1. You may copy and distribute verbatim copies of the Program's source code ",
5057 "as you receive it, in any medium, provided that you conspicuously and ",
5058 "appropriately publish on each copy an appropriate copyright notice and ",
5059 "disclaimer of warranty; keep intact all the notices that refer to this ",
5060 "License and to the absence of any warranty; and give any other recipients of ",
5061 "the Program a copy of this License along with the Program. ",
5063 "You may charge a fee for the physical act of transferring a copy, and you may ",
5064 "at your option offer warranty protection in exchange for a fee. ",
5066 "2. You may modify your copy or copies of the Program or any portion of it, ",
5067 "thus forming a work based on the Program, and copy and distribute such ",
5068 "modifications or work under the terms of Section 1 above, provided that you ",
5069 "also meet all of these conditions: ",
5071 "a) You must cause the modified files to carry prominent notices stating ",
5072 "that you changed the files and the date of any change. ",
5074 "b) You must cause any work that you distribute or publish, that in whole or ",
5075 "in part contains or is derived from the Program or any part thereof, to be ",
5076 "licensed as a whole at no charge to all third parties under the terms of ",
5079 "c) If the modified program normally reads commands interactively when run, ",
5080 "you must cause it, when started running for such interactive use in the ",
5081 "most ordinary way, to print or display an announcement including an ",
5082 "appropriate copyright notice and a notice that there is no warranty (or ",
5083 "else, saying that you provide a warranty) and that users may redistribute ",
5084 "the program under these conditions, and telling the user how to view a copy ",
5085 "of this License. (Exception: if the Program itself is interactive but does ",
5086 "not normally print such an announcement, your work based on the Program is ",
5087 "not required to print an announcement.) ",
5089 "These requirements apply to the modified work as a whole. If identifiable ",
5090 "sections of that work are not derived from the Program, and can be reasonably ",
5091 "considered independent and separate works in themselves, then this License, ",
5092 "and its terms, do not apply to those sections when you distribute them as ",
5093 "separate works. But when you distribute the same sections as part of a whole ",
5094 "which is a work based on the Program, the distribution of the whole must be ",
5095 "on the terms of this License, whose permissions for other licensees extend to ",
5096 "the entire whole, and thus to each and every part regardless of who wrote it. ",
5098 "Thus, it is not the intent of this section to claim rights or contest your ",
5099 "rights to work written entirely by you; rather, the intent is to exercise the ",
5100 "right to control the distribution of derivative or collective works based on ",
5103 "In addition, mere aggregation of another work not based on the Program with ",
5104 "the Program (or with a work based on the Program) on a volume of a storage or ",
5105 "distribution medium does not bring the other work under the scope of this ",
5108 "3. You may copy and distribute the Program (or a work based on it, under ",
5109 "Section 2) in object code or executable form under the terms of Sections 1 ",
5110 "and 2 above provided that you also do one of the following: ",
5112 "a) Accompany it with the complete corresponding machine-readable source ",
5113 "code, which must be distributed under the terms of Sections 1 and 2 above ",
5114 "on a medium customarily used for software interchange; or, ",
5116 "b) Accompany it with a written offer, valid for at least three years, to ",
5117 "give any third party, for a charge no more than your cost of physically ",
5118 "performing source distribution, a complete machine-readable copy of the ",
5119 "corresponding source code, to be distributed under the terms of Sections 1 ",
5120 "and 2 above on a medium customarily used for software interchange; or, ",
5122 "c) Accompany it with the information you received as to the offer to ",
5123 "distribute corresponding source code. (This alternative is allowed only for ",
5124 "noncommercial distribution and only if you received the program in object ",
5125 "code or executable form with such an offer, in accord with Subsection b ",
5128 "The source code for a work means the preferred form of the work for making ",
5129 "modifications to it. For an executable work, complete source code means all ",
5130 "the source code for all modules it contains, plus any associated interface ",
5131 "definition files, plus the scripts used to control compilation and ",
5132 "installation of the executable. However, as a special exception, the source ",
5133 "code distributed need not include anything that is normally distributed (in ",
5134 "either source or binary form) with the major components (compiler, kernel, ",
5135 "and so on) of the operating system on which the executable runs, unless that ",
5136 "component itself accompanies the executable. ",
5138 "If distribution of executable or object code is made by offering access to ",
5139 "copy from a designated place, then offering equivalent access to copy the ",
5140 "source code from the same place counts as distribution of the source code, ",
5141 "even though third parties are not compelled to copy the source along with the ",
5144 "4. You may not copy, modify, sublicense, or distribute the Program except as ",
5145 "expressly provided under this License. Any attempt otherwise to copy, modify, ",
5146 "sublicense or distribute the Program is void, and will automatically ",
5147 "terminate your rights under this License. However, parties who have received ",
5148 "copies, or rights, from you under this License will not have their licenses ",
5149 "terminated so long as such parties remain in full compliance. ",
5151 "5. You are not required to accept this License, since you have not signed it. ",
5152 "However, nothing else grants you permission to modify or distribute the ",
5153 "Program or its derivative works. These actions are prohibited by law if you ",
5154 "do not accept this License. Therefore, by modifying or distributing the ",
5155 "Program (or any work based on the Program), you indicate your acceptance of ",
5156 "this License to do so, and all its terms and conditions for copying, ",
5157 "distributing or modifying the Program or works based on it. ",
5159 "6. Each time you redistribute the Program (or any work based on the Program), ",
5160 "the recipient automatically receives a license from the original licensor to ",
5161 "copy, distribute or modify the Program subject to these terms and conditions. ",
5162 "You may not impose any further restrictions on the recipients' exercise of ",
5163 "the rights granted herein. You are not responsible for enforcing compliance ",
5164 "by third parties to this License. ",
5166 "7. If, as a consequence of a court judgment or allegation of patent ",
5167 "infringement or for any other reason (not limited to patent issues), ",
5168 "conditions are imposed on you (whether by court order, agreement or ",
5169 "otherwise) that contradict the conditions of this License, they do not excuse ",
5170 "you from the conditions of this License. If you cannot distribute so as to ",
5171 "satisfy simultaneously your obligations under this License and any other ",
5172 "pertinent obligations, then as a consequence you may not distribute the ",
5173 "Program at all. For example, if a patent license would not permit ",
5174 "royalty-free redistribution of the Program by all those who receive copies ",
5175 "directly or indirectly through you, then the only way you could satisfy both ",
5176 "it and this License would be to refrain entirely from distribution of the ",
5179 "If any portion of this section is held invalid or unenforceable under any ",
5180 "particular circumstance, the balance of the section is intended to apply and ",
5181 "the section as a whole is intended to apply in other circumstances. ",
5183 "It is not the purpose of this section to induce you to infringe any patents ",
5184 "or other property right claims or to contest validity of any such claims; ",
5185 "this section has the sole purpose of protecting the integrity of the free ",
5186 "software distribution system, which is implemented by public license ",
5187 "practices. Many people have made generous contributions to the wide range of ",
5188 "software distributed through that system in reliance on consistent ",
5189 "application of that system; it is up to the author/donor to decide if he or ",
5190 "she is willing to distribute software through any other system and a licensee ",
5191 "cannot impose that choice. ",
5193 "This section is intended to make thoroughly clear what is believed to be a ",
5194 "consequence of the rest of this License. ",
5196 "8. If the distribution and/or use of the Program is restricted in certain ",
5197 "countries either by patents or by copyrighted interfaces, the original ",
5198 "copyright holder who places the Program under this License may add an ",
5199 "explicit geographical distribution limitation excluding those countries, so ",
5200 "that distribution is permitted only in or among countries not thus excluded. ",
5201 "In such case, this License incorporates the limitation as if written in the ",
5202 "body of this License. ",
5204 "9. The Free Software Foundation may publish revised and/or new versions of ",
5205 "the General Public License from time to time. Such new versions will be ",
5206 "similar in spirit to the present version, but may differ in detail to address ",
5207 "new problems or concerns. ",
5209 "Each version is given a distinguishing version number. If the Program ",
5210 "specifies a version number of this License which applies to it and \"any later ",
5211 "version\", you have the option of following the terms and conditions either of ",
5212 "that version or of any later version published by the Free Software ",
5213 "Foundation. If the Program does not specify a version number of this License, ",
5214 "you may choose any version ever published by the Free Software Foundation. ",
5216 "10. If you wish to incorporate parts of the Program into other free programs ",
5217 "whose distribution conditions are different, write to the author to ask for ",
5218 "permission. For software which is copyrighted by the Free Software ",
5219 "Foundation, write to the Free Software Foundation; we sometimes make ",
5220 "exceptions for this. Our decision will be guided by the two goals of ",
5221 "preserving the free status of all derivatives of our free software and of ",
5222 "promoting the sharing and reuse of software generally. ",
5224 "\01JNO WARRANTY\01I ",
5226 "11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR ",
5227 "THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE ",
5228 "STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE ",
5229 "PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, ",
5230 "INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND ",
5231 "FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND ",
5232 "PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, ",
5233 "YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ",
5235 "12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING ",
5236 "WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR ",
5237 "REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, ",
5238 "INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING ",
5239 "OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO ",
5240 "LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR ",
5241 "THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER ",
5242 "PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE ",
5243 "POSSIBILITY OF SUCH DAMAGES. ",
5245 "END OF TERMS AND CONDITIONS ",
5249 static char * htxt_mailing_list
[] = {
5250 "\01IThere are two separate mailing lists for nedit users, and one for developers. ",
5251 "Users may post to the developer mailing list to report defects and communicate ",
5252 "with the nedit developers. Remember that nedit is entirely a volunteer ",
5253 "effort, so please ask questions first to the discussion list, and do your ",
5254 "share to answer other users questions as well. ",
5256 "\01A discuss@nedit.org\n",
5258 "General discussion, questions and answers among NEdit users and developers. ",
5260 "\01A announce@nedit.org\n",
5262 "A low-volume mailing list for announcing new versions. ",
5264 "\01A develop@nedit.org\n",
5266 "Communication among and with NEdit developers. ",
5267 "Developers should also subscribe to the discuss list. ",
5269 "To subscribe, send mail to one of the following addresses: ",
5271 "\01A announce-request@nedit.org\n",
5272 " discuss-request@nedit.org\n",
5273 " develop-request@nedit.org\n",
5275 "with the body consisting of the single word ",
5281 static char * htxt_defects
[] = {
5282 "\01RSolutions to Common Problems\01I",
5284 "For a much more comprehensive list of common problems and solutions, see the ",
5285 "NEdit FAQ. The latest version of the FAQ can always be found on the NEdit ",
5288 "\01A http://www.nedit.org.\n",
5290 "\01JP: No files are shown in the \"Files\" list in the Open... dialog.\01I ",
5292 "S: When you use the \"Filter\" field, include the file specification or a ",
5293 "complete directory specification, including the trailing \"/\" on Unix. ",
5294 "(See Help in the Open... dialog). ",
5296 "\01JP: Find Again and Replace Again don't continue in the same direction as the original Find or Replace.\01I ",
5298 "S: Find Again and Replace Again don't use the direction of the original ",
5299 "search. The Shift key controls the direction: Ctrl+G means forward, ",
5300 "Shift+Ctrl+G means backward. ",
5302 "\01JP: Preferences specified in the Preferences menu don't seem to get saved when I select Save Defaults.\01I ",
5304 "S: NEdit has two kinds of preferences: 1) per-window preferences, in the ",
5305 "Preferences menu, and 2) default settings for preferences in newly created ",
5306 "windows, in the Default Settings sub-menu of the Preferences menu. ",
5307 "Per-window preferences are not saved by Save Defaults, only Default ",
5310 "\01JP: Columns and indentation don't line up.\01I ",
5312 "S: NEdit is using a proportional width font. Set the font to a fixed style ",
5313 "(see Preferences menu). ",
5315 "\01JP: NEdit performs poorly on very large files.\01I ",
5317 "S: Turn off Incremental Backup. With Incremental Backup on, NEdit ",
5318 "periodically writes a full copy of the file to disk. ",
5320 "\01JP: Commands added to the Shell Commands menu (Unix only) don't output anything until they are finished executing.\01I ",
5322 "S: If the command output is directed to a dialog, or the input is from a ",
5323 "selection, output is collected together and held until the command ",
5324 "completes. De-select both of the options and the output will be shown ",
5325 "incrementally as the command executes. ",
5327 "\01JP: Dialogs don't automatically get keyboard focus when they pop up.\01I ",
5329 "S: Most X Window managers allow you to choose between two categories of ",
5330 "keyboard focus models: pointer focus, and explicit focus. Pointer focus ",
5331 "means that as you move the mouse around the screen, the window under the ",
5332 "mouse automatically gets the keyboard focus. NEdit users who use this ",
5333 "focus model should set \"Popups Under Pointer\" in the Default Settings sub ",
5334 "menu of the preferences menu in NEdit. Users with the explicit focus ",
5335 "model, in some cases, may have problems with certain dialogs, such as Find ",
5336 "and Replace. In MWM this is caused by the mwm resource startupKeyFocus ",
5337 "being set to False (generally a bad choice for explicit focus users). ",
5338 "NCDwm users should use the focus model \"click\" instead of \"explicit\", ",
5339 "again, unless you have set it that way to correct specific problems, this ",
5340 "is the appropriate setting for most explicit focus users. ",
5342 "\01JP: The Backspace key doesn't work, or deletes forward rather than backward.\01I ",
5344 "S: While this is an X/Motif binding problem, and should be solved outside of ",
5345 "NEdit in the Motif virtual binding layer (or possibly xmodmap or ",
5346 "translations), NEdit provides an out. If you set the resource: ",
5347 "nedit.remapDeleteKey to True, NEdit will forcibly map the delete key to ",
5348 "backspace. The default setting of this resource recently changed, so ",
5349 "users who have been depending on this remapping will now have to set it ",
5350 "explicitly (or fix their bindings). ",
5352 "\01JP: NEdit crashes when I try to paste text in to a text field in a dialog (like Find or Replace) on my SunOS system.\01I ",
5354 "S: On many SunOS systems, you have to set up an nls directory before various ",
5355 "inter-client communication features of Motif will function properly. ",
5356 "There are instructions in README.sun in /pub/v5_0_2/individual/README.sun on ",
5357 "ftp.nedit.org, as well as a tar file containing a complete nls ",
5358 "directory: ftp://ftp.nedit.org/pub/v5_0_2/nls.tar. ",
5359 "README.sun contains directions for setting up an nls directory, which ",
5360 "is required by Motif for handling copy and paste to Motif text fields. ",
5362 "\01RKnown Defects\01I",
5364 "Below is the list of known defects which affect NEdit. The defects your copy ",
5365 "of NEdit will exhibit depend on which system you are running and with which ",
5366 "Motif libraries it was built. Note that there are now Motif 1.2 and/or 2.0 ",
5367 "libraries available on ALL supported platforms, and as you can see below ",
5368 "there are far fewer defects in Motif 1.2, so it is in your best interest to ",
5369 "upgrade your system. ",
5371 "\01SAll Versions\01I",
5373 "\01A\01BDEFECT\01A\n",
5374 "\01IOperations between rectangular selections on overlapping lines do nothing. ",
5376 "\01A\01CWork Around\01A\n",
5377 "\01INone. These operations are very complicated and rarely used. ",
5379 "\01A\01BDEFECT\01A\n",
5380 "\01ICut and Paste menu items fail, or possibly crash, ",
5381 "for very large (multi-megabyte) selections. ",
5383 "\01A\01CWork Around\01A\n",
5384 "\01IUse selection copy (middle mouse button click) ",
5385 "for transferring larger quantities of data. ",
5386 "Cut and Paste save the copied text in server ",
5387 "memory, which is usually limited. ",
5389 "\01RReporting Defects\01I",
5391 "Submit bugs through the web at: ",
5393 "\01A http://sf.net/tracker/?func=add&group_id=11005&atid=111005\n",
5395 "Please include the first few lines from Help > Version, which identifies ",
5396 "NEdit's version and other system attributes important for diagnosing your ",
5399 "The NEdit developers subscribe to both discuss@nedit.org and ",
5400 "develop@nedit.org, either of which may be used for reporting defects. If ",
5401 "you're not sure, or you think the report might be of interest to the general ",
5402 "NEdit user community, send the report to discuss@nedit.org. If it's ",
5403 "something obvious and boring, like we misspelled \"anemometer\" in the on-line ",
5404 "help, send it to develop@nedit.org. If you don't want to subscribe to the ",
5405 "\01QMailing Lists\01I, please add a note to your mail about cc'ing you on responses. ",
5409 static char * htxt_tabs_dialog
[] = {
5410 "\01IThe Tabs dialog controls both the operation of the Tab key, and ",
5411 "the interpretation of tab characters within a file. ",
5413 "The first field, Tab Spacing, controls how NEdit responds to ",
5414 "tab characters in a file. On most Unix and VMS systems the ",
5415 "conventional interpretation of a tab character is to advance the ",
5416 "text position to the nearest multiple of eight characters (a tab ",
5417 "spacing of 8). However, many programmers of C and other ",
5418 "structured languages, when given the choice, prefer a tab ",
5419 "spacing of 3 or 4 characters. Setting a three or four character ",
5420 "hardware tab spacing is useful and convenient as long as your ",
5421 "other software tools support it. Unfortunately, on Unix and VMS ",
5422 "systems, system utilities, such as more, and printing software ",
5423 "can't always properly display files with other than eight ",
5426 "Selecting \"Emulate Tabs\" will cause the Tab key to insert the ",
5427 "correct number of spaces or tabs to reach the next tab stop, as ",
5428 "if the tab spacing were set at the value in the \"Emulated tab ",
5429 "spacing\" field. Backspacing immediately after entering an ",
5430 "emulated tab will delete it as a unit, but as soon as you move ",
5431 "the cursor away from the spot, NEdit will forget that the ",
5432 "collection of spaces and tabs is a tab, and will treat it as ",
5433 "separate characters. To enter a real tab character with ",
5434 "\"Emulate Tabs\" turned on, use Ctrl+Tab. ",
5436 "In generating emulated tabs, and in Shift Left, Paste Column, ",
5437 "and some rectangular selection operations, NEdit inserts blank ",
5438 "characters (spaces or tabs) to preserve the alignment of ",
5439 "non-blank characters. The bottom toggle button in the Tabs ",
5440 "dialog instructs NEdit whether to insert tab characters as ",
5441 "padding in such situations. Turning this off, will keep NEdit ",
5442 "from automatically inserting tabs. Some software developers ",
5443 "prefer to keep their source code free of tabs to avoid its ",
5444 "misinterpretation on systems with different tab character ",
5449 static char * htxt_custom_title_dialog
[] = {
5450 "\01IThe Customize Window Title dialog allows you to customize ",
5451 "and test the way information will be displayed in each window's ",
5454 "\01JDefinition of the title\01I ",
5456 "The upper half of the dialog can be used to select the various ",
5457 "components that should be displayed in the title. The layout can be ",
5458 "fine-tuned by editing the printf() like format string below the ",
5459 "component buttons: additional characters can be entered, or the ",
5460 "order can be changed. ",
5462 "The following sequences are interpreted in the format string: ",
5464 "\01A %c ClearCase view tag (only relevant when NEdit is \n",
5465 " used together with ClearCase)\n",
5466 " %[n]d directory, with one optional numeric digit n \n",
5467 " specifying the maximum number of trailing directory \n",
5468 " components to display. Skipped components are \n",
5469 " replaced by an ellipsis (...).\n",
5470 " %f file name, without the path name\n",
5472 " %s NEdit server name (server mode only)\n",
5473 " %[*]S file status, either verbose (%S) or brief (%*S).\n",
5474 " In verbose mode the file status is spelled out: \n",
5475 " read-only, locked, and modified. In brief mode, \n",
5476 " abbreviations and an asterisk are used for the \n",
5477 " respective states: RO, LO, *.\n",
5480 "The format string and the component buttons are continously synchronized. ",
5482 "The default format is: ",
5484 "\01A {%c} [%s] %f (%S) - %d\n",
5486 "The resulting title will only contain elements with ",
5487 "a value. Hence, the title is compressed as follows: ",
5489 "\01A * Elements with no value are removed. \n",
5491 "\01A * Empty parenthesis pairs i.e. (), [] or {}, or parenthesis\n",
5492 " pairs containing only space(s), are removed.\n",
5494 "\01A * Sequences of spaces are replaced with one space.\n",
5496 "\01A * Leading spaces and dashes are removed. \n",
5498 "\01A * Trailing spaces and dashes are removed. \n",
5500 "If the server name and the ClearCase view tag are identical, only ",
5501 "the first one specified in the format string will be displayed. ",
5503 "\01JPreviewing the settings\01I ",
5505 "The lower part of the dialog can be used to test the selected title ",
5506 "under various conditions. For some of the components that are selected ",
5507 "for display, various states can be enforced on the preview. ",
5509 "For instance, components that are not always active (such the ",
5510 "NEdit server name) can be turned on or off in the preview. ",
5515 static char **HelpText
[] = {
5532 htxt_escapeSequences
,
5533 htxt_parenConstructs
,
5534 htxt_advancedTopics
,
5557 htxt_custom_title_dialog
5562 { &H_M
[ 1], 1, HELP_START
, "start", 0, 'G', NULL
},
5563 { &H_M
[ 2], 1, HELP_none
, "basicOp", 0, 'B', "Basic Operation" },
5564 { &H_M
[ 3], 2, HELP_SELECT
, "select", 0, 'S', NULL
},
5565 { &H_M
[ 4], 2, HELP_SEARCH
, "search", 0, 'F', NULL
},
5566 { &H_M
[ 5], 2, HELP_CLIPBOARD
, "clipboard", 0, 'C', NULL
},
5567 { &H_M
[ 6], 2, HELP_MOUSE
, "mouse", 0, 'U', NULL
},
5568 { &H_M
[ 7], 2, HELP_KEYBOARD
, "keyboard", 0, 'K', NULL
},
5569 { &H_M
[ 8], 2, HELP_FILL
, "fill", 0, 'h', NULL
},
5570 { &H_M
[ 9], 2, HELP_INTERFACE
, "interface", 0, 'T', NULL
},
5571 { &H_M
[10], 2, HELP_FORMAT
, "format", 0, 'i', NULL
},
5572 { &H_M
[11], 1, HELP_none
, "features", 0, 'F', "Features for Programming" },
5573 { &H_M
[12], 2, HELP_PROGRAMMER
, "programmer", 0, 'P', NULL
},
5574 { &H_M
[13], 2, HELP_TABS
, "tabs", 0, 'T', NULL
},
5575 { &H_M
[14], 2, HELP_INDENT
, "indent", 0, 'A', NULL
},
5576 { &H_M
[15], 2, HELP_SYNTAX
, "syntax", 0, 'S', NULL
},
5577 { &H_M
[16], 2, HELP_TAGS
, "tags", 0, 'F', NULL
},
5578 { &H_M
[17], 2, HELP_CALLTIPS
, "calltips", 0, 'C', NULL
},
5579 { &H_M
[18], 1, HELP_none
, "regex", 0, 'R', "Regular Expressions" },
5580 { &H_M
[19], 2, HELP_BASICSYNTAX
, "basicSyntax", 0, 'B', NULL
},
5581 { &H_M
[20], 2, HELP_ESCAPESEQUENCES
, "escapeSequences", 0, 'M', NULL
},
5582 { &H_M
[21], 2, HELP_PARENCONSTRUCTS
, "parenConstructs", 0, 'P', NULL
},
5583 { &H_M
[22], 2, HELP_ADVANCEDTOPICS
, "advancedTopics", 0, 'A', NULL
},
5584 { &H_M
[23], 2, HELP_EXAMPLES
, "examples", 0, 'E', NULL
},
5585 { &H_M
[24], 1, HELP_none
, "extensions", 0, 'M', "Macro/Shell Extensions" },
5586 { &H_M
[25], 2, HELP_SHELL
, "shell", 1, 'S', NULL
},
5587 { &H_M
[26], 2, HELP_LEARN
, "learn", 0, 'L', NULL
},
5588 { &H_M
[27], 2, HELP_MACRO_LANG
, "macro_lang", 0, 'M', NULL
},
5589 { &H_M
[28], 2, HELP_MACRO_SUBRS
, "macro_subrs", 0, 'a', NULL
},
5590 { &H_M
[29], 2, HELP_RANGESET
, "rangeset", 0, 'R', NULL
},
5591 { &H_M
[30], 2, HELP_HILITEINFO
, "hiliteInfo", 0, 'H', NULL
},
5592 { &H_M
[31], 2, HELP_ACTIONS
, "actions", 0, 'A', NULL
},
5593 { &H_M
[32], 1, HELP_none
, "customizing", 0, 'C', "Customizing" },
5594 { &H_M
[33], 2, HELP_CUSTOMIZE
, "customize", 0, 'C', NULL
},
5595 { &H_M
[34], 2, HELP_PREFERENCES
, "preferences", 0, 'P', NULL
},
5596 { &H_M
[35], 2, HELP_RESOURCES
, "resources", 0, 'X', NULL
},
5597 { &H_M
[36], 2, HELP_BINDING
, "binding", 0, 'K', NULL
},
5598 { &H_M
[37], 2, HELP_PATTERNS
, "patterns", 0, 'H', NULL
},
5599 { &H_M
[38], 2, HELP_SMART_INDENT
, "smart_indent", 0, 'S', NULL
},
5600 { &H_M
[39], 1, HELP_COMMAND_LINE
, "command_line", 0, 'N', NULL
},
5601 { &H_M
[40], 1, HELP_SERVER
, "server", 0, 'C', NULL
},
5602 { &H_M
[41], 1, HELP_RECOVERY
, "recovery", 0, 'a', NULL
},
5603 { &H_M
[42], 1, HELP_none
, "separator1", 0, '-', NULL
},
5604 { &H_M
[43], 1, HELP_VERSION
, "version", 0, 'V', NULL
},
5605 { &H_M
[44], 1, HELP_DISTRIBUTION
, "distribution", 0, 'G', NULL
},
5606 { &H_M
[45], 1, HELP_MAILING_LIST
, "mailing_list", 0, 'L', NULL
},
5607 { &H_M
[46], 1, HELP_DEFECTS
, "defects", 0, 'P', NULL
},
5608 { &H_M
[47], 1, HELP_TABS_DIALOG
, "tabs_dialog", 9, 'T', NULL
},
5609 { NULL
, 1, HELP_CUSTOM_TITLE_DIALOG
, "custom_title_dialog", 9, 'C', NULL
}
5614 { &H_R
[ 1], 54, HELP_TAGS
, "ctag support", "ctags" },
5615 { NULL
, 5625, HELP_BASICSYNTAX
, "Alternation", "alternation" }
5618 static const char * NEditVersion
= "NEdit release of Feb 9, 2005\n";