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