Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://star.arm.ac.uk/nedit/nedit_page2.htm
Дата изменения: Sat Mar 8 01:30:47 1997 Дата индексирования: Mon Oct 1 23:42:45 2012 Кодировка: Поисковые слова: spirit rover |
The Shell menu (Unix versions only) allows you to execute Unix shell commands from within NEdit. You can add items to the menu to extend NEdit's command set or to incorporate custom automatic editing features using shell commands or editing languages like awk and sed. To add items to the menu, use the Shell Commands... dialog in the Preferences menu under Default Settings. NEdit comes pre-configured with a few useful Unix commands like spell and sort, but we encourage you to add your own custom extensions.
- Filter Selection... prompts you for a Unix command to use to process the currently selected text. The output from this command replaces the contents of the selection.
- Execute Command... prompts you for a Unix command and replaces the current selection with the output of the command. If there is no selection, it deposits the output at the current insertion point.
- Execute Command Line uses the position of the cursor in the window to indicate a line to execute as a shell command line. The cursor may be positioned anywhere on the line. This command allows you to use an NEdit window as an editable command window for saving output and saving commands for re-execution.
The X resource called nedit.shell (See Customizing NEdit) determines which Unix shell is used to execute commands. The default value for this resource is /bin/csh.
Selecting Learn Keystrokes from the Macro menu puts NEdit in learn mode. In learn mode, keystrokes and menu commands are recorded, to be played back later, using the Replay Keystrokes command, or pasted into a macro in the Macro Commands dialog of the Default Settings menu in Preferences.
Note that only keyboard and menu commands are recorded, not mouse clicks or mouse movements since these have no absolute point of reference, such as cursor or selection position. When you do a mouse-based operation in learn mode, NEdit will beep (repeatedly) to remind you that the operation was not recorded.
NEdit 4.0 has a very limited ability to process macros. Macro commands can use all of NEdit's editing functionality, available from either the keyboard or menus, however, there is not yet a macro "language". That is, you can't use branching or looping, and can't set or test variables.
The way to accomplish more complex editing tasks, is still to use the Shell Commands dialog to attach programs written in awk, sed, Perl, etc.
As they stand, macros are useful for saving Learn/Replay sequences, for limited key-binding, and, surprisingly, many very complex tasks can be coded in terms of regular expression substitutions.
Key binding via macros is simpler than any other method available in NEdit, because you don't have to deal with X resources or translation table syntax. However, the only way to change menu accelerator keys is through X resources, and if you try to do a lot key binding via the Macro Commands dialog, you will quickly end up with a very large Macro menu.
A macro in this version of NEdit is simply a list of newline-separated actions. NEdit action routines are listed in the Action Routines section of the Help menu. The easiest way to write a macro, is to record keystrokes and menu choices in learn mode, then paste the macro in the Macro Commands dialog, using the Paste Learn/Replay Macro button.
NEdit can be operated on its own, or as a two-part client/server application. Client/server mode is useful for integrating NEdit with software development environments, mailers, and other programs; or just as a quick way to open files from the shell command line without starting a new NEdit session.
To run NEdit in server mode, type:
nedit -server
NEdit can also be started in server mode via the nc program when no servers are available.
The nc (for NEdit Client) program, which is distributed along with nedit, sends commands to an nedit server to open files, select lines, or execute editor actions. It accepts a limited set of the nedit command line options: -read, -create, -line (or +n), -do, and a list of file names. Listing a file on the nc command line means, open it if it is not already open and bring the window to the front. -read and -create affect only newly opened files, but -line and -do can also be used on files which are already open (See "NEdit Command Line" for more information).
In typical Unix style, arguments affect the files which follow them on the command line, for example:
incorrect: nc file.c -line 25
correct: nc -line 25 file.c
nc also accepts one command line option of its own, -noask (or -ask), which instructs it whether to automatically start a server if one is not available. This is also settable via the X resource, nc.autoStart (See X Resources below).
Sometimes it is useful to have more than one NEdit server running, for example to keep mail and programming work separate, or more importantly for working with tools like ClearCase which provide different views of the file system from different shells. The option, -svrname, to both nedit and nc, allow you to start, and communicate with, separate named servers. A named server responds only to requests with the corresponding -svrname argument.
Communication between nc and nedit is through the X display. So as long as X windows is set up and working properly, nc will will work properly as well. nc uses the DISPLAY environment variable, the machine name and your user name to find the appropriate server, meaning, if you have several machines sharing a common file system, nc will not be able to find a server that is running on a machine with a different host name, even though it may be perfectly appropriate for editing a given file.
The command which nc uses to start an nedit server is settable via the X resource nc.serverCommand, by default, "nedit -server".
If a system crash, network failure, X server crash, or program error should happen while you are editing a file, you can easily recover most of your work. NEdit maintains a backup file which it updates periodically (every 8 editing operations or 30 characters typed under Unix, or 80 characters under VMS). This file is has the same name as the file that you are editing, but with the character "~" (tilde) on Unix or "_" (underscore) on VMS prefixed to the name. To recover a file after a crash, simply rename the file to remove the tilde or underscore character, replacing the older version of the file. Because several of the Unix shells consider the tilde to be a special character, you may have to prefix the character with a "\" (backslash) when you move or delete an NEdit backup file.
Example, to recover the file called "help.c" type the command:
mv \~help.c help.c
On VMS, type:
RENAME _HELP.C HELP.C
nedit [-read] [-create] [-line n | +n] [-server] [-do command] [-tags file] [-tabs n] [-wrap] [-nowrap] [-autoindent] [-noautoindent] [-autosave] [-noautosave] [-rows n] [-columns n] [-font font] [-geometry geometry] [-display [host]:server[.screen] [-xrm resourcestring] [-svrname name] [file...]
-read
Open the file Read Only regardless of the actual file protection.
-create
Don't warn about file creation when a file doesn't exist.
-line n (or +n)
Go to line number n
-server
Designate this session as an NEdit server, for processing commands from the nc program. nc can be used to interface NEdit to code development environments, mailers, etc., or just as a quick way to open files from the shell command line without starting a new NEdit session.
-do command
Execute an NEdit action routine. on each file following the -do argument on the command line. -do is particularly useful from the nc program, where nc -do can remotely execute commands in an nedit -server session.
-tags file
Load a file of directions for finding definitions of program subroutines and data objects. The file must be of the format generated by the Unix ctags command.
-tabs n
Set tab stops every n characters.
-wrap, -nowrap
Wrap lines at the right edge of he window rather than continuing them past it.
-autoindent, noautoindent
Maintain a running indent.
-autosave, -noautosave
Maintain a backup copy of the file being edited under the name ~filename (on Unix) or _filename (on VMS).
-rows n
Default height in characters for an editing window.
-columns n
Default width in characters for an editing window.
-font font (or -fn font)
Font for text being edited (Font for menus and dialogs can be set with -xrm "*fontList:font").
-display [host]:server[.screen]
The name of the X server to use. host specifies the machine, server specifies the display server number, and screen specifies the screen number. host or screen can be omitted and default to the local machine, and screen 0.
-geometry geometry (or -g geometry)
The initial size and/or location of editor windows. The argument has the form:
[<width>x<height>][+|-][<xoffset>[+|-]<yoffset>]
where <width> and <height> are the desired width and height of the window, and <xoffset> and <yoffset> are the distance from the edge of the screen to the window, + for top or left, - for bottom or right.
-background color (or -bg color)
Background color. (background color for text can be set separately with: -xrm "nedit*text.background: color").
-foreground color (or -fg color)
Foreground color. (foreground color for text can be set separately with: -xrm "nedit*text.foreground: color").
-xrm resourcestring
Set the value of an X resource to override a default value (see Customizing NEdit).
-svrname name
When starting nedit in server mode, name the server, such that it responds to requests only when nc is given a corresponding -svrname argument. By naming servers, you can run several simultaneously, and direct files and commands specifically to any one.
NEdit can be customized in quite a number of ways. The most important user-settable options are presented in the Preferences menu, including all options that users might need to change during an editing session. Options set in the Default Settings sub-menu of the Preferences menu can be preserved between sessions by selecting Save Defaults, which writes a file called .nedit in the user's home directory. See the section titled "Preferences" for more details.
User defined commands can be added to both NEdit's Shell and Macro menus. Dialogs for creating items in these menus can be found in the Default Settings sub menu of the Preferences menu (labeled Shell Commands and Macro Commands). Since NEdit's macro facility is not yet well developed, the best way to add complex automatic editing features is through shell commands that call programs like awk and sed, rather than through NEdit macros.
For hard-core users who depend on NEdit every day and want to tune every excruciating detail, there are also X resources for a vast number of such details, down to the color of each individual button. However, some options of importance to average users are also set via X resources, most importantly, key binding. While limited key binding can be done through the Macro Commands dialog in the Preferences menu, significant changes should be made via the Translations resource and menu accelerator resources. The section titled "X Resources" has more information on setting X resources, as well as a list of selected resources of interest to the average user.
The Preferences menu allows you to set options for both the current editing window, and default values for newly created windows and future NEdit sessions. The first group of options in the Preferences menu take effect immediately and refer to the current window only. Options in the Default Settings sub-menu have no effect on the current window, but instead provide initial settings for future windows created using the New or Open commands. Preferences set in the Default Settings sub-menu can also be saved in a file that is automatically read by NEdit at startup time, by selecting Save Defaults.
Auto Indent
Maintain a running indent. Pressing the return key will line up the cursor with the indent level of the previous line.
Auto Wrap
Wrap text at word boundaries when the cursor reaches the right margin.
Wrap Margin...
Set margin for Auto Wrap and Fill Paragraph. By default, lines wrap at the right margin of the window, but a wrap margin can also be set at a specific column.
Preserve Last Version
On Save, write a backup copy of the file as it existed before the Save command with the extension .bck (Unix only).
Incremental Backup
Periodically make a backup copy of the file being edited under the name ~filename on Unix or _filename on VMS (see Crash Recovery).
Show Matching (..)
Momentarily highlight matching parenthesis, brackets, and braces when one of these characters is typed, or when the insertion cursor is positioned after it.
Text Font...
Set the font for the text in this NEdit window. To set the font for all windows use the equivalent item in the Default Settings sub-menu. Note that since the font selection dialog narrows its lists of font characteristics depending on those already selected, it is important to know that you can unselect them by clicking on the selected items a second time.
Tabs
Set the tab distance (number of characters between tab stops) for tab characters, and control tab emulation and use of tab characters in padding and emulated tabs.
Overstrike
In overstrike mode, new characters entered replace the characters in front of the insertion cursor, rather than being inserted before them.
Statistics Line
Show the full file name, line number, and length of the file being edited.
Default Settings
Sub-menu of initial settings for future windows. These are the same as the options in the main part of the menu, but apply as defaults for future windows created during this NEdit session. These settings can be saved using the Save Defaults command below, to be loaded automatically each time NEdit is started.
Save Defaults
Save the default options as set under Default Settings for future NEdit sessions.
NEdit has additional options to those provided in the Preferences menu which are set using X resources. Like most other X programs, NEdit can be customized to vastly unnecessary proportions, from initial window positions down to the font and shadow colors of each individual button (A complete discussion of how to do this is left to books on the X Windows System). Key binding (see "Binding Keys to Actions" below) is one of the most useful of these resource settable options.
X resources are usually specified in a file called .Xdefaults in your home directory (on VMS this is sys$login:decw$xdefaults.dat). On some systems, this file is read and its information attached to the X server (your screen) when you start X. On other systems, the .Xdefaults file is read each time you run an X program. When X defaults are attached to the server, you can use a program called xrdb to update them without restarting X.
The .nedit (saved preferences) file is in the same format as an X resource file, and its contents can be moved into your X resource file. One reason for doing so would be to attach server specific preferences, such as a default font to a particular X server. Another reason for moving preferences into the X resource file would be to keep preferences menu options and resource settable options together in one place. Though the files are the same format, additional resources should not be added to the .nedit file, they will not be read, and NEdit modifies this file by overwriting it completely. Note also that the contents of the .nedit file take precedence over the values of X resources. Using Save Defaults after moving the contents of your .nedit file to your .Xdefaults file will re-create the .nedit file, interfering with the options that you have moved.
The following are selected NEdit resource names and default values for NEdit options not settable via the Preferences menu (for preference resource names, see your .nedit file):
nedit.tagFile: (not defined)
The name of a file of the type produced by the Unix ctags command which NEdit will load at startup time (see Features for Programmers). The tag file provides a database from which NEdit can automatically open files containing the definition of a particular subroutine or data type.
nedit.shell: /bin/csh
(Unix systems only) The Unix shell (command interpreter) to use for executing commands from the Shell menu
nedit.wordDelimiters: .,/\\`'!@#%^&*()-=+{}[]":;<>?
The characters, in addition to blanks and tabs, which mark the boundaries between words for the move-by-word (Ctrl+Arrow) and select-word (double click) commands.
nedit.remapDeleteKey: True
Setting this resource to False restores the original Motif binding of the delete key to forward-delete. This binding causes problems when X servers with one delete/ backspace configuration are connected with X clients of the other. Users with a backspace key in the backspace/delete position and who use only machines with that style of keyboard can set this resource to False to get back the forward-delete function of the delete key.
nedit.stdOpenDialog: False
Setting this resource to True restores the standard Motif style of Open dialog. NEdit file open dialogs are missing a text field at the bottom of the dialog, where the file name can be entered as a string. The field is removed in NEdit to encourage users to type file names in the list, a non-standard, but much faster method for finding files.
nedit.printCommand: (system specific)
Command used by the print dialog to print a file, i.e. lp, lpr, etc..
nedit.printCopiesOption: (system specific)
Option name used to specify multiple copies to the print command. If the option should be separated from its argument by a space, leave a trailing space. If blank, no "Number of Copies" item will appear in the print dialog.
nedit.printQueueOption: (system specific)
Option name used to specify a print queue to the print command. If the option should be separated from its argument by a space, leave a trailing space. If blank, no "Queue" item will appear in the print dialog.
nedit.printNameOption: (system specific)
Option name used to specify a job name to the print command. If the option should be separated from its argument by a space, leave a trailing space. If blank, no job or file name will be attached to the print job or banner page.
nedit.printHostOption: (system specific)
Option name used to specify a host name to the print command. If the option should be separated from its argument by a space, leave a trailing space. If blank, no "Host" item will appear in the print dialog.
nedit.printDefaultQueue: (system specific)
The name of the default print queue. Used only to display in the print dialog, and has no effect on printing.
nedit.printDefaultHost: (system specific)
The node name of the default print host. Used only to display in the print dialog, and has no effect on printing.
nedit.multiClickTime: (system specific)
Maximum time in milliseconds allowed between mouse clicks within double and triple click actions.
nedit*scrollBarPlacement: BOTTOM_LEFT
How scroll bars are placed in NEdit windows, as well as various lists and text fields in the program. Other choices are: BOTTOM_RIGHT, TOP_LEFT, or TOP_RIGHT.
nedit*text.heavyCursor: False
For monitors with poor resolution or users who have difficulty seeing the cursor, makes the cursor in the text editing area of the window heavier and darker.
nedit*text.foreground: black
Foreground color of the text editing area of the NEdit window.
nedit*text.background: white
Background color of the text editing area of the NEdit window.
nedit*text.selectForeground: black
Foreground (text) color for selections in the text editing area of the NEdit window.
nedit*text.selectBackground: gray80
Color for selections in the text editing area of the NEdit window.
nedit*text.highlightForeground: white
Foreground (text) color for highlights (parenthesis flashing) in the text editing area of the NEdit window.
nedit*text.highlightBackground: red
Color for highlights (parenthesis flashing) in the text editing area of the NEdit window.
nedit*text.cursorForeground: black
Color for text cursor in the text editing area of the NEdit window.
nedit*text.blinkRate: 600
Blink rate of the text insertion cursor in milliseconds. Set to zero to stop blinking.
nedit*text.Translations:
Modifies key bindings (see below).
nedit*statsLine.foreground: black
Foreground color of the statistics line area of the NEdit window.
nedit*statsLine.background: gray70
Background color of the statistics line area of the NEdit window.
nc.autoStart: False
Whether the nc program should automatically start an NEdit server (without prompting the user) if an appropriate server is not found.
nc.serverCommand: nedit -server
Command used by the nc program to start an NEdit server.
There are several ways to change key bindings in NEdit. The easiest way to add a new key binding in NEdit is to define a macro in the Macro Commands dialog in the Default Settings sub-menu of the Preferences menu. However, if you want to change existing bindings or add a significant number of new key bindings you will need to do so via X resources. The methods for changing menu accelerator keys is different from that for general key binding via translation tables. The section "Action Routines" lists the actions available to be bound.
The most general way to bind actions to keys in NEdit is to use the translation table associated with the text widget. To add a binding to Alt+Y to insert the string "Hi!", for example, add lines similar to the following to your X resource file:
NEdit*text.Translations: #override \n\ Alt<Key>y: insert-string("Hi!") \n
Unfortunately, the syntax for translation tables is not simple and is not covered completely here. You will need to refer to a book on the X window system for the exact syntax for translation tables. Translation tables map key and mouse presses, window operations, and other kinds of events to actions. The syntax (somewhat oversimplified) is a keyword; #override, #augment, or #replace; followed by lines (separated by newline characters) pairing events with actions. Events begin with modifiers, like Ctrl, Shift, or Alt, followed by the event type in <>. BtnDown, Btn1Down, Btn2Down, Btn1Up, Key, KeyUp are valid event types. For key presses, the event type is followed by the name of the key. You can specify a combination of events, such as a sequence of key presses, by separating them with commas. The other half of the event/action pair is a set of actions. These are separated from the event specification by a colon and from each other by spaces. Actions are names followed by parentheses, optionally containing one or more parameters separated by comas.
The menu shortcut keys shown at the right of NEdit menu items can also be changed via X resources. Each menu item has two resources associated with it, accelerator, the event to trigger the menu item; and acceleratorText, the string shown in the menu. The form of the accelerator resource is the same as events for translation table entries discussed above, though multiple keys and other subtleties are not allowed. The resource name for a menu is the title in lower case, followed by "Menu", the resource name of menu item is the name in lower case, run together, with words separated by caps, and all punctuation removed. For example, to change Cut to Ctrl+X, you would add the following to your .Xdefaults file:
- nedit*editMenu.cut.accelerator: Ctrl<Key>x
- nedit*editMenu.cut.acceleratorText: Ctrl+X
Accelerator keys with optional shift key modifiers, like Find..., have an additional accelerator resource with Shift appended to the name. For example:
- nedit*searchMenu.find.acceleratorText: [Shift]Alt+F
- nedit*searchMenu.find.accelerator: Alt<Key>f
- nedit*searchMenu.findShift.accelerator: Shift Alt<Key>f
All of the editing capabilities of NEdit are represented as a special type of subroutine, called an action routine, which can be invoked from both macros and translation table entries (see "Binding Keys to Actions" in the X Resources section below).
File Menu
--------------------------
new()
open()
open-dialog()
open-selected()
close()
save()
save-as()
save-as-dialog()
revert-to-saved()
include-file()
include-file-dialog()
load-tags-file()
load-tags-file-dialog()
print()
print-selection()
exit()
Search Menu
----------------------------
find()
find-dialog()
find-same()
find-selection()
replace()
replace-dialog()
replace-all()
replace-in-selection()
replace-same()
goto-line-number()
goto-line-number-dialog()
goto-selected()
mark()
mark-dialog()
goto-mark()
goto-mark-dialog()
match()
find-definition()
split-window()
close-pane()
Edit Menu
--------------------------
undo()
redo()
clear()
select-all()
shift-left()
shift-left-by-tab()
shift-right()
shift-right-by-tab()
capitalize()
lowercase()
fill-paragraph()
control-code-dialog()
Shell Menu
----------------------------
filter-selection-dialog()
filter-selection()
execute-command()
execute-command-dialog()
execute-command-line()
shell-menu-command()
Macro Menu
----------------------------
macro-menu-command()
The actions representing menu commands are named the same as the menu item with punctuation removed, all lower case, and dashes replacing spaces. Without the -dialog suffix, commands which normally prompt the user for information, instead take the information from the routine's arguments (see below). To present a dialog and ask the user for input, rather than supplying it in via arguments, use the actions with the -dialog suffix.
Arguments are text strings enclosed in quotes. Below are the menu action routines which take arguments. Optional arguments are inclosed in [].
open(filename)
save-as(filename)
include(filename)
load-tags-file(filename)
find-dialog([search-direction])
find(search-string [, search-direction], [search-type])
find-same([i])
find-selection([search-direction])
replace-dialog([search-direction])
replace(search-string, replace-string, [, search-direction] [, search-type])
replace-in-selection(search-string, replace-string [, search-type])
replace-same([search-direction])
goto-line-number([line-number])
mark(mark-letter)
goto-mark(mark-letter)
filter-selection(shell-command)
execute-command(shell-command)
shell-menu-command(shell-menu-item-name)
macro-menu-command(macro-menu-item-name)
Some notes on function arguments:
filename
Path names are interpreted relative to the directory from which NEdit was started, wildcards and ~ are not expanded.
search-direction
Either "forward" or "backward"
search-type
Either "literal", "case", or "regex"
mark-letter
The mark command limits users to single letters. Inside of macros, numeric marks are allowed, which won't interfere with marks set by the user.
(macro or shell)-menu-item-name
Name of the command exactly as specified in the Macro Commands or Shell Commands dialogs
backward-character()
Moves the cursor one character to the left.
backward-paragraph()
Moves the cursor to the beginning of the paragraph, or if the cursor is already at the beginning of a paragraph, moves the cursor to the beginning of the previous paragraph. Paragraphs are defined as regions of text delimited by one or more blank lines.
backward-word()
Moves the cursor to the beginning of a word, or, if the cursor is already at the beginning of a word, moves the cursor to the beginning of the previous word. Word delimiters are user-settable, and defined by the X resource wordDelimiters.
beginning-of-file()
Moves the cursor to the beginning of the file.
beginning-of-line()
Moves the cursor to the beginning of the line.
beginning-of-selection()
Moves the cursor to the beginning of the selection without disturbing the selection.
copy-clipboard()
Copies the current selection to the clipboard.
copy-primary()
Copies the primary selection to the cursor.
copy-to()
If a secondary selection exists, copies the secondary selection to the cursor. If no secondary selection exists, copies the primary selection to the pointer location.
copy-to-or-end-drag()
Completes either a secondary selection operation, or a primary drag. If the user is dragging the mouse to adjust a secondary selection, the selection is copied and either inserted at the cursor location, or, if pending-delete is on and a primary selection exists in the window, replaces the primary selection. If the user is dragging a block of text (primary selection), completes the drag operation and leaves the text at it's current location.
cut-clipboard()
Deletes the text in the primary selection and places it in the clipboard.
cut-primary()
Copies the primary selection to the cursor and deletes it at its original location.
delete-selection()
Deletes the contents of the primary selection.
delete-next-character()
If a primary selection exists, deletes its contents. Otherwise, deletes the character following the cursor.
delete-previous-character()
If a primary selection exists, deletes its contents. Otherwise, deletes the character before the cursor.
delete-next-word()
If a primary selection exists, deletes its contents. Otherwise, deletes the word following the cursor.
delete-previous-word()
If a primary selection exists, deletes its contents. Otherwise, deletes the word before the cursor.
delete-to-start-of-line()
If a primary selection exists, deletes its contents. Otherwise, deletes the characters between the cursor and the start of the line.
delete-to-end-of-line()
If a primary selection exists, deletes its contents. Otherwise, deletes the characters between the cursor and the end of the line.
deselect-all()
De-selects the current selection.
end-of-file()
Moves the cursor to the end of the file.
end-of-line()
Moves the cursor to the end of the line.
end-of-selection()
Moves the cursor to the end of the selection without disturbing the selection.
exchange()
Exchange the primary and secondary selections.
extend-adjust()
Attached mouse-movement events to begin a selection between the cursor and the mouse, or extend the primary selection to the mouse position.
extend-end()
Completes a primary drag-selection operation.
extend-start()
Begins a selection between the cursor and the mouse. A drag-selection operation can be started with either extend-start or grab-focus.
forward-character()
Moves the cursor one character to the right.
forward-paragraph()
Moves the cursor to the beginning of the next paragraph. Paragraphs are defined as regions of text delimited by one or more blank lines.
forward-word()
Moves the cursor to the beginning of the next word. Word delimiters are user-settable, and defined by the X resource wordDelimiters.
grab-focus()
Moves the cursor to the mouse pointer location, and prepares for a possible drag-selection operation (bound to extend-adjust), or multi-click operation (a further grab-focus action). If a second invocation of grab focus follows immediately, it selects a whole word, or a third, a whole line.
insert-string("string")
If pending delete is on and the cursor is inside the selection, replaces the selection with "string". Otherwise, inserts "string" at the cursor location.
key-select("direction")
Moves the cursor one character in "direction" ("left", "right", "up", or "down") and extends the selection. Same as: forward/backward-character("extend"), or process-up/down("extend"), for compatibility with previous versions.
move-destination()
Moves the cursor to the pointer location without disturbing the selection. (This is an unusual way of working. We left it in for compatibility with previous versions, but if you actually use this capability, please send us some mail, otherwise it is likely to disappear in the future.
move-to()
If a secondary selection exists, deletes the contents of the secondary selection and inserts it at the cursor, or if pending-delete is on and there is a primary selection, replaces the primary selection. If no secondary selection exists, moves the primary selection to the pointer location, deleting it from its original position.
move-to-or-end-drag()
Completes either a secondary selection operation, or a primary drag. If the user is dragging the mouse to adjust a secondary selection, the selection is deleted and either inserted at the cursor location, or, if pending-delete is on and a primary selection exists in the window, replaces the primary selection. If the user is dragging a block of text (primary selection), completes the drag operation and deletes the text from it's current location.
newline()
Inserts a newline character. If Auto Indent is on, lines up the indentation of the cursor with the current line.
newline-and-indent()
Inserts a newline character and lines up the indentation of the cursor with the current line, regardless of the setting of Auto Indent.
newline-no-indent()
Inserts a newline character, without automatic indentation, regardless of the setting of Auto Indent.
next-page()
Moves the cursor and scroll forward one page.
page-left()
Move the cursor and scroll left one page.
page-right()
Move the cursor and scroll right one page.
paste-clipboard()
Insert the contents of the clipboard at the cursor, or if pending delete is on, replace the primary selection with the contents of the clipboard.
previous-page()
Moves the cursor and scroll backward one page.
process-bdrag()
Same as secondary-or-drag-start for compatibility with previous versions.
process-cancel()
Cancels the current extend-adjust, secondary-adjust, or secondary-or-drag-adjust in progress.
process-down()
Moves the cursor down one line.
process-return()
Same as newline for compatibility with previous versions.
process-shift-down()
Same as process-down("extend") for compatibility with previous versions.
process-shift-up()
Same as process-up("extend") for compatibility with previous versions.
process-tab()
If tab emulation is turned on, inserts an emulated tab, otherwise inserts a tab character.
process-up()
Moves the cursor up one line.
secondary-adjust()
Attached mouse-movement events to extend the secondary selection to the mouse position.
secondary-or-drag-adjust()
Attached mouse-movement events to extend the secondary selection, or reposition the primary text being dragged. Takes two optional arguments, "copy", and "overlay". "copy" leaves a copy of the dragged text at the site at which the drag began. "overlay" does the drag in overlay mode, meaning the dragged text is laid on top of the existing text, obscuring and ultimately deleteing it when the drag is complete.
secondary-or-drag-start()
To be attached to a mouse down event. Begins drag selecting a secondary selection, or dragging the contents of the primary selection, depending on whether the mouse is pressed inside of an existing primary selection.
secondary-start()
To be attached to a mouse down event. Begin drag selecting a secondary selection.
select-all()
Select the entire file.
self-insert()
To be attached to a key-press event, inserts the character equivalent of the key pressed.
In addition to the arguments listed in the call descriptions, any routine involving cursor movement can take the argument "extend", meaning, adjust the primary selection to the new cursor position. Routines which take the "extend" argument as well as mouse dragging operations for both primary and secondary selections can take the optional keyword "rect", meaning, make the selection rectangular.
No files are shown in the "Files" list in the Open... dialog.
When you use the "Filter" field, include the file specification or a complete directory specification, including the trailing "/" on Unix. (See Help in the Open... dialog).
Keyboard shortcuts for menu items don't work.
Be sure the Caps Lock and Num Lock keys are both unlocked. In Motif programs, these keys prevent the menu accelerators from working.
Find Same and Replace Same don't continue in the same direction as the original Find or Replace.
Find Same and Replace Same don't use the direction of the original search. The Shift key controls the direction: Ctrl+G means forward, Shift+Ctrl+G means backward.
Preferences specified in the Preferences menu don't seem to get saved when I select Save Defaults.
NEdit has two kinds of preferences:
- Per-window preferences, in the Preferences menu
- Default settings for preferences in newly created windows, in the Default Settings sub-menu of the Preferences menu.
Per-window preferences are not saved by Save Defaults; only Default Settings.
Columns and indentation don't line up.
NEdit is using a proportional width font. Set the font to a fixed style (see Preferences).
NEdit performs poorly on very large files.
Turn off Incremental Backup. With Incremental Backup on, NEdit periodically writes a full copy of the file to disk.
Commands added to the Shell Commands menu (Unix only) don't output anything until they are finished executing.
If the command output is directed to a dialog, or the input is from a selection, output is collected together and held until the command completes. De-select both of the options and the output will be shown incrementally as the command executes.
Dialogs don't automatically get keyboard focus when they pop up.
Most X Window managers allow you to choose between two categories of keyboard focus models: pointer focus, and explicit focus. Pointer focus means that as you move the mouse around the screen, the window under the mouse automatically gets the keyboard focus. NEdit users who use this focus model should set "Popups Under Pointer" in the Default Settings sub menu of the preferences menu in NEdit. Users with the explicit focus model, in some cases, may have problems with certain dialogs, such as Find and Replace. In MWM this is caused by the mwm resource startupKeyFocus being set to False (generally a bad choice for explicit focus users). NCDwm users should use the focus model "click" instead of "explicit", again, unless you have set it that way to correct specific problems, this is the appropriate setting for most explicit focus users.
Below is the list of known bugs which affect NEdit. The bugs your copy of NEdit will exhibit depend on which system you are running and with which Motif libraries it was built. Note that there are now Motif 1.2 / X11R5 libraries available on ALL supported platforms, and as you can see below there are far fewer bugs in Motif 1.2, so it is in your best interest to upgrade your system.
All Versions:
- Operations between rectangular selections on overlapping lines do nothing.
WORKAROUND: None. These operations are very complicated and rarely used, maybe next version.
- Cut and Paste menu items fail, or possibly crash, for very large (multi-megabyte) selections.
WORKAROUND: Use selection copy (middle mouse button click) for transferring larger quantities of data. Cut and Paste save the copied text in server memory, which is usually limited.
Motif 1.1 Versions:
- The shortcut method for entering control characters (Alt+Ctrl+char) is not available.
WORKAROUND: Use the Ins. Control Char command.
- Pop-up dialogs "jump" (appear briefly in a different location) when they are first invoked.
WORKAROUND: Turn off "Popups Under Pointer" if this gives you a headache.
VMS Versions:
- Abbreviation of command line qualifiers is not allowed. Error messages for mistakes on the command line don't make sense.
WORKAROUND: NEdit does not parse its command line with the standard DCL command parser, instead, it superficially converts the command line to a Unix-style command line before processing it. Because information is lost, NEdit may not always be able to distinguish between items that are supposed to be qualifiers and those which are supposed to be files and arguments to the qualifiers. However, correct VMS command lines are always processed correctly, and only certain types of errors will appear to give strange results.
- Protection settings for new versions of files produced by NEdit over DECNET connections may revert to defaults.
WORKAROUND: Check and reset protections when accessing files via DECNET.
IBM Versions built with Motif 1.1
- The Command to set the font for the current window is not available.
WORKAROUND: Use the Default Settings sub-menu to set the default font and then create a new window.
- NEdit can occasionally crash on window closing.
WORKAROUND: Save files frequently, see Crash Recovery.
There are now two separate mailing lists for NEdit users. nedit_discuss, as the name implies, is for open discussion among NEdit users. nedit_announces intended to be a very low volume mailing list for announcement of new versions, new executables, and significant contributed software.
- To subscribe to nedit_discuss, send a message containing the following line in the body of the message (not the subject) to mailserv@fnal.gov:
subscribe nedit_discuss
- To subscribe to nedit_announce, send a separate message to mailserv@fnal.gov containing the line:
subscribe nedit_announce
- To unsubscribe, send a message containing the following line in the body of the message (not the subject) to mailserv@fnal.gov:
unsubscribe nedit_discuss (or nedit_announce)
After subscribing, you will receive copies of all of the email submitted to the list. You may submit mail to the discussion list by sending it to:
nedit_discuss@fnal.gov
Users are allowed to post to nedit_announce as well (just make sure that the content is appropriate).
FermiTools Software Legal Information - November 1, 1996
COPYRIGHT STATUS: Fermi National Accelerator Laboratory (FNAL) documents are sponsored by the U.S. Department of Energy under Contract No. DE-AC02-76CH03000. Therefore, the U.S. Government retains a non-exclusive, royalty-free license to publish or reproduce these documents or software for U.S. Government purposes. All documents and software available from this server are protected under the U.S. and Foreign Copyright Laws, and FNAL reserves all rights.
Terms and Conditions:
When a User distributes or otherwise obtains a software package included in the Fermilab Software Tools Program, the user agrees to abide by the Terms and Conditions of the Program below:
- Any redistribution of the software shall be accompanied by this INFORMATION/LICENSE AGREEMENT and the product's ORIGIN STATEMENT (below).
- The User shall acknowledge the origin of the software as set forth below:
"This work was performed at Fermi National Accelerator Laboratory, operated by Universities Research Association, Inc., under contract DE-AC02-76CH03000 with the U.S. Department of Energy."
- The user is asked to feed back problems, benefits, and/or suggestions about the software to the Fermilab Software Providers and/or FermiTools management.
- Any distribution of the software available from this server shall be at no charge. To obtain a license to commercialize any of the software programs available from Fermilab including this software, contact FNAL's Office of Research and Technology Applications, P.O. Box 500, MS-200, Batavia, IL 60510-0500.
Indemnification by User of Third Party Claims and Disclosure of Liability
The User, his/her directors, officers, employees, and agents hereby release and waive all claims against Universities Research Association, Inc. (URA) operator of Fermi National Accelerator Laboratory, its trustees, overseers, directors, officers, employees, agents, subcontractors, successors and assigns, for any and all liability and damages arising from the reproduction, use or other disposition of the software. The User shall indemnify URA and the U.S. Government for all damages, costs or expenses, including attorney's fees, arising from the utilization of the software, including, but not limited to, the making, using, selling or exporting of products, processes or services derived from the Software. The User agrees to indemnify, hold harmless and defend URA, its trustees, overseers, directors, officers, employees, agents, subcontractors, successors and assigns, against any and all liability, damage, loss, cost, charge, claim, demand, fee or expense of every nature and kind which may at any time hereafter, be sustained by URA by reason of claims of third parties arising out of alleged acts or omissions of the User in the reproduction, use or other disposition of the Software.
The User agrees that URA, its trustees, overseers, directors, officers, employees, agents, subcontractors, successors and assigns shall not be liable under any claim, charge, or demand, whether in contract, tort, criminal law, or otherwise, for any and all loss, cost, charge, claim, demand, fee, expense, or damage of every nature and kind arising out of, connected with, resulting from or sustained as a result of the use of the software programs available from this server. In no event shall URA be liable for special, direct, indirect or consequential damages, losses, costs, charges, claims, demands, fees or expenses of any nature or kind.
Disclaimer of Warranties
The software is provided on an "as is" basis only. URA makes no representations, express or implied. URA makes no representations or warranties of merchantability or fitness for any particular purpose, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product or process disclosed, or represents that the Software will not infringe any privately held patent, copyright, or trademark. The entire risk as to the results and the performance of this software is assumed by the User.
Disclaimer of Endorsement
Reference herein to any specific commercial products, process, or service by tradename, trademark, manufacturer or otherwise, does not constitute or imply its endorsement, recommendation, or favoring by the United States Government, U.S. Department of Energy or URA. The views and opinions of individuals expressed herein do not necessarily state or reflect those of the United States Government, U.S. Department of Energy or URA and shall not be used for advertising or product endorsement purposes.
Liabilities of the Government
This software is provided by URA, independent from its Prime Contract with the U.S. Department of Energy. URA is acting independently from the Government and in its own private capacity and is not acting on behalf of the U.S. Government, nor as its contractor nor its agent. Correspondingly, it is understood and agreed that the U.S. Government has no connection to this software and in no manner whatsoever shall be liable for nor assume any responsibility or obligation for any claim, cost, or damages arising out of or resulting from the use of the software available from this server.
ORIGIN STATEMENT
Authors
Mark Edel, Joy Kyriakopulos, Arnulfo Zepeda-Navratil, Suresh Ravoor, Donna Reid, Jeff Kallenbach
Fermi National Accelerator Laboratory MS 234 P.O.Box 500 Batavia, IL 60510
E-mail: edel@fnal.gov
Acknowledgement:
Regular expression code by Henry Spencer
Nedit incorporates an altered version of Henry Spencer's regcomp and regexec code adapted for NEdit. Original copyright notice:
Copyright (c) 1986 by University of Toronto. Written by Henry Spencer. Not derived from licensed software.
Permission is granted to anyone to use this software for any purpose on any computer system, and to redistribute it freely, subject to the following restrictions:
- The author is not responsible for the consequences of use of this software, no matter how awful, even if they arise from defects in it.
- The origin of this software must not be misrepresented, either by explicit claim or by omission.
- Altered versions must be plainly marked as such, and must not be misrepresented as being the original software.
End of INFORMATION/LICENSE AGREEMENT FOR NEDIT.
Send questions and comments to: nedit_support@fnal.gov.