Документ взят из кэша поисковой машины. Адрес оригинального документа : http://star.arm.ac.uk/nedit/nedit_page1.htm
Дата изменения: Sat Mar 8 01:30:47 1997
Дата индексирования: Mon Oct 1 23:42:20 2012
Кодировка:

Поисковые слова: universe
NeditPage1

Summary

NEdit is a GUI (Graphical User Interface) style text editor for programs and plain-text files. Users of Macintosh and MS Windows based text editors will find NEdit a familiar and comfortable environment. NEdit provides all of the standard menu, dialog, editing, and mouse support, as well as all of the standard shortcuts to which the users of modern GUI based environments are accustomed. For users of older style Unix editors, welcome to the world of mouse-based editing!

NEdit is free, available in source and binary form for Silicon Graphics, HP, DEC, IBM, Sun, and Linux systems, as well as for VAX and Alpha VMS. Executables for non-supported systems are also available. Porting to other Motif platforms has generally been easy.



Installing NEdit

NEdit is a single stand-alone executable file which can be installed by simply copying the appropriate executable "nedit" for your system. Both sources and executables are available via anonymous ftp to ftp.fnal.gov in the /pub/nedit directory. The optional "nc" (NEdit Client) program is also available for users who want to run nedit in client/server mode.



Getting Started

If you are new to X windows, you may need some help setting up your X environment or using X across a network. If you have used other Motif programs before, you can probably use NEdit without much instruction.

Start NEdit by typing nedit. You can specify a file or several files to edit on the command line, but you can also open them from inside NEdit. If you don't specify a file name to edit, NEdit will open a window titled "Untitled". You can create a new file by typing into this window and choosing Save or Save As... from the File menu. There is no "main window" in NEdit, all editor windows are equivalent, and NEdit remains running as long as at least one window is open.

Most editor commands are available from the pulldown menus (File, Edit, Search, etc.). If you make a mistake, any editing operation can be undone by selecting Undo from the Edit menu. Online help is also available through the Help menu on the right-hand side of the menu bar.

To open an existing file once nedit is running, choose Open... from the File menu. Select the file that you want to open in the pop-up dialog that appears, and click on OK. You may have any number of files open at the same time. Each file will appear in its own editor window. Using Open..., rather than re-typing the nedit command and running additional copies of NEdit, is both more memory-efficient, and allows NEdit to better manage your files.

As you become more familiar with NEdit, you can use the control and function keys shown on the right side of the pull-down menus, as a substitute for selecting items with the mouse.

Dialogs are also streamlined so you can enter information quickly and without using the mouse. Keyboard focus is automatically directed to the first field in a dialog when the dialog pops up. To move the keyboard focus around a dialog, use the tab and arrow keys. One of the buttons in a dialog is usually drawn with a thick, indented, outline. This button can be activated by pressing return or enter. For example, to replace the string "thing" with "things" type:

<ctrl-r>thing<tab>things<return>

To open a file named "whole_earth.c", type:

<ctrl-o>who<return>

(how much of the filename you need to type depends on the other files in the directory). See the section titled Keyboard Shortcuts for more information.


Selecting, Cutting and Pasting

NEdit has two general types of selections, primary (highlighted text), and secondary (underlined text). Selections can cover either a simple range of text between two points in the file, or they can cover a rectangular area of the file. Rectangular selections are only useful with non-proportional (fixed spacing) fonts.

To select text for copying, deleting, or replacing, press the left mouse button with the pointer at one end of the text you want to select, and drag it to the other end. The text will become highlighted. To select a whole word, double click (click twice quickly in succession). Double clicking and then dragging the mouse will select a number of words. Similarly, you can select a whole line or a number of lines by triple clicking or triple clicking and dragging. Quadruple clicking selects the whole file. After releasing the mouse button, you can still adjust a selection by holding down the shift key and dragging on either end of the selection. To delete the selected text, press delete or backspace. To replace it, begin typing.

To select a rectangle or column of text, hold the Ctrl key while dragging the mouse. Rectangular selections can be used in any context that normal selections can be used, including cutting and pasting, filling, shifting, dragging, and searching. Operations on rectangular selections automatically fill in tabs and spaces to maintain alignment of text within and to the right of the selection. Note that the interpretation of rectangular selections by Fill Paragraph is slightly different from that of other commands, the section titled "Text Filling" has details.

The middle mouse button can be used to make an additional selection (called the secondary selection). As soon as the button is released, the contents of this selection will be copied to the insert position of the window where the mouse was last clicked (the destination window). This position is marked by a caret shaped cursor when the mouse is outside of the destination window. If there is a (primary) selection, adjacent to the cursor in the window, the new text will replace the selected text. Holding the shift key while making the secondary selection will move the text, deleting it at the site of the secondary selection, rather than copying it.

Selected text can also be dragged to a new location in the file using the middle mouse button. Holding the shift key while dragging the text will copy the selected text, leaving the original text in place. Holding the control key will drag the text in overlay mode.

Normally, dragging moves text by removing it from the selected position at the start of the drag, and inserting it at a new position relative to to the mouse. Dragging a block of text over existing characters, displaces the characters to the end of the selection. In overlay mode, characters which are occluded by blocks of text being dragged are simply removed. When dragging non-rectangular selections, overlay mode also converts the selection to rectangular form, allowing it to be dragged outside of the bounds of the existing text.

The section "Using the Mouse" sumarizes the mouse commands for making primary and secondary selections. Primary selections can also be made via keyboard commands, see "Keyboard Shortcuts".

The easiest way to copy and move text around in your file or between windows, is to use the clipboard, an imaginary area that temporarily stores text and data. The Cut command removes the selected text (see Selecting Text) from your file and places it in the clipboard. Once text is in the clipboard, the Paste command will copy it to the insert position in the current window. For example, to move some text from one place to another, select it by dragging the mouse over it, choose Cut to remove it, click the pointer to move the insert point where you want the text inserted, then choose Paste to insert it. Copy copies text to the clipboard without deleting it from your file. You can also use the clipboard to transfer text to and from other Motif programs and X programs which make proper use of the clipboard.


Finding and Replacing Text

The Search menu contains a number of commands for finding and replacing text.

The Find... and Replace... commands present dialogs for entering text for searching and replacing. These dialogs also allow you to choose whether you want the search to be sensitive to upper and lower case, or whether to use the standard Unix pattern matching characters (regular expressions). Searches begin at the current text insertion position.

Find Same and Replace Same repeat the last find or replace command without prompting for search strings. To selectively replace text, use the two commands in combination: Find Same, then Replace Same if the highlighted string should be replaced, or Find Same again to go to the next string.

Find Selection searches for the text contained in the current primary selection (see Selecting Text). The selected text does not have to be in the current editor window, it may even be in another program. For example, if the word dog appears somewhere in a window on your screen, and you want to find it in the file you are editing, select the word dog by dragging the mouse across it, switch to your NEdit window and choose Find Selection from the Search menu.

Searching Backwards

Holding down the shift key while choosing any of the search or replace commands from the menu (or using the keyboard shortcut), will search in the reverse direction. Users who have set the search direction using the buttons in the search dialog, may find it a bit confusing that Find Same and Replace Same don't continue in the same direction as the original search (for experienced users, consistency of the direction implied by the shift key is more important).

Selective Replacement

To replace only some occurrences of a string within a file, choose Replace... from the Search menu, enter the string to search for and the string to substitute, and finish by pressing the Find button. When the first occurrence is highlighted, use either Replace Same (^T) to replace it, or Find Same (^G) to move to the next occurrence without replacing it, and continue in such a manner through all occurrences of interest.

To replace all occurrences of a string within some range of text, select the range (see Selecting Text), choose Replace... from the search menu, type the string to search for and the string to substitute, and press the "R. in Selection" button in the dialog. Note that selecting text in the Replace... dialog will unselect the text in the window.

Regular Expressions

Regular expressions are available in the Find... and Replace... dialogs as a way to match inexact sequences of characters. Regular expression substitution can also be used to program automatic editing operations. For example, the following are search and replace strings to find occurences of the subroutine get_x, reverse the first and second parameters, add a third parameter of NULL, and change the name to new_get_x":

Search string: get_x\(([^ ,]*), ([^\)]*)\)
Replace string: new_get_x(\2, \1, NULL)

To use regular expressions, click on the Regular Expression button in the Find... or Replace... dialogs before doing a search or replacement.

Regular Expression Syntax

The components of a regular expression are: branches, pieces, atoms, and ranges. A regular expression consists of zero or more branches, separated by `|'. It matches anything that matches one of the branches.

A branch is zero or more pieces, concatenated. It matches a match for the first, followed by a match for the second, etc.

A piece is an atom possibly followed by `*', `+', or `?'. An atom followed by
`*' matches a sequence of 0 or more matches of the atom. An atom followed by
`+' matches a sequence of 1 or more matches of the atom. An atom followed by
`?' matches a match of the atom, or the null string.

An atom is a regular expression in parentheses (matching a match for the regular expression), a range (see below), `.' (matching any single character), `^' (matching the null string at the beginning of a line string), `$' (matching the null string at the end of a line), a `\' followed by a single character (matching that character), or a single character with no other significance (matching that character). \t, \n, \b, \r, and \f represent the characters tab newline, backspace, carriage return, and form feed.

A range is a sequence of characters enclosed in `[]'. It normally matches any single character from the sequence. If the sequence begins with `^', it matches any single character not from the rest of the sequence. If two characters in the sequence are separated by `-', this is shorthand for the full list of ASCII characters between them (e.g. `[0-9]' matches any decimal digit). To include a literal `]' in the sequence, make it the first character (following a possible `^'). To include a literal `-', make it the first or last character. A backslash `\' followed by a single character includes that character, however backslashes are not necessary for most special characters, since inside a range, only the `]', `-', and '\' characters are treated specially.

Substitution

Wherever the substitution string contains the character `&', NEdit will substitute the entire string that was matched in the Find operation. Up to nine sub-expressions of the match string can also be inserted into the replacement string, using `\' followed by a digit. \1 through \9 represent the strings that matched parenthesized expressions within the regular expression, numbered left-to-right in order of their opening parentheses. Preceding & or \1-9 with \U, \u, \L, or \l adjusts the case of the inserted text. \u and \l change only the first character, while \U and \L change the entire string to upper or lower case. \t, \n, \b, \r, and \f represent the characters tab newline, backspace, carriage return, and form feed in a substitution string represent the tab and newline characters as they do in match strings.

Ambiguity

If a regular expression could match two different parts of the text, it will match the one which begins earliest. If both begin in the same place but match different lengths, or match the same length in different ways, life gets messier, as follows.

In general, the possibilities in a list of branches are considered in left-to-right order, the possibilities for `*', `+', and `?' are considered longest-first, nested constructs are considered from the outermost in, and concatenated constructs are considered leftmost-first. The match that will be chosen is the one that uses the earliest possibility in the first choice that has to be made. If there is more than one choice, the next will be made in the same manner (earliest possibility) subject to the decision on the first choice. And so forth.

For example, `(ab|a)b*c' could match `abc' in one of two ways. The first choice is between `ab' and `a'; since `ab' is earlier, and does lead to a successful overall match, it is chosen. Since the `b' is already spoken for, the `b*' must match its last possibility-the empty string-since it must respect the earlier choice.

In the particular case where no `|'s are present and there is only one `*', `+', or `?', the net effect is that the longest possible match will be chosen. So `ab*', presented with `xabbbby', will match `abbbb'. Note that if `ab*' is tried against `xabyabbbz', it will match `ab' just after `x', due to the begins-earliest rule. (In effect, the decision on where to start the match is the first choice to be made, hence subsequent choices must respect it even if this leads them to less-preferred alternatives.)



Features for Programmers

Indentation

With Auto Indent turned on (the default), NEdit keeps a running indent. When you press the return key, space and tabs are inserted to line up the insert point under the start of the previous line. Ctrl+Return in auto-indent mode acts like a normal return, With auto-indent turned off, Ctrl+Return does indentation.

The Shift Left and Shift Right commands adjust the indentation for several lines at once. To shift a block of text one character to the right, select the text, then choose Shift Right from the Edit menu. Note that the accelerator keys for these menu items are Ctrl+9 and Ctrl+0, which correspond to the right and left parenthesis on most keyboards. Remember them as adjusting the text in the direction pointed to by the parenthesis character. Holding the Shift key while selecting either Shift Left or Shift Right will shift the text by one tab stop.

Tabs

Most Unix programs for text display and processing, assume an eight character tab. Unfortunately, an 8 character tab is not convenient for programming in C, C++, and other structured languages. Inside of NEdit and other editors that allow you to change the interpretation of the tab character, it is much easier to work with C code when the tab distance is set to match the program indentation distance, usually 3 or 4 characters. However, there are serious tradeoffs to using non-standard tabs. In addition to many Unix utilities not displaying or interpreting the files correctly, other programmers may not interpret the files correctly, or may use editors which can't display or edit the files properly.

An alternative to changing the interpretation of the tab character is tab emulation. In the Tabs... dialog, turning on Emulated Tabs causes the Tab key to insert the correct number of spaces and/or tabs to bring the cursor the next emulated tab stop, as if tabs were set at the emulated tab distance rather than the hardware tab distance. Backspacing immediately after entering an emulated tab will delete it as a unit, but as soon as you move the cursor away from the spot, NEdit will forget that the collection of spaces and tabs is a tab, and will treat it as separate characters. To enter a real tab character with "Emulate Tabs" turned on, use Ctrl+Tab.

It is also possible to tell NEdit not to insert ANY tab characters at all in the course of processing emulated tabs, and in shifting and rectangular insertion/deletion operations, for programmers who worry about the misinterpretation of tab characters on other systems.

Line Numbers

To find a particular line in a source file by line number, choose Goto Line #... from the Search menu. You can also directly select the line number text in the compiler message in the terminal emulator window (xterm, decterm, winterm, etc.) where you ran the compiler, and choose Goto Selected from the Search menu. Note that under AIXWindows (IBM), selections in aixterms appear to go away when you release the mouse, but they are actually retained and can be used by NEdit and other programs that use selections.

To find out the line number of a particular line in your file, turn on Statistics Line in the Preferences menu and position the insertion point anywhere on the line. The statistics line continuously updates the line number of the line containing the cursor.

Matching Parentheses

To help you inspect nested parentheses, brackets, braces, quotes, and other characters, NEdit has both an automatic parenthesis matching mode, and a Find Matching command. Automatic parenthesis matching is activated when you type, or move the insertion cursor after a parenthesis, bracket, or brace. It momentarily highlights the matching character if that character is visible in the window. To find a matching character anywhere in the file, select it or position the cursor after it, and choose Find Matching from the Search menu. If the character matches itself, such as a quote or slash, select the first character of the pair. NEdit will match {, (, [, <, ", ', `, /, and \.

Opening Included Files

The Open Selected command in the File menu understands the C preprocessor's #include syntax, so selecting an #include line and invoking Open Selected will generally find the file referred to, unless doing so depends on the settings of compiler switches or other information not available to NEdit.

Finding Subroutine and Data Declarations

NEdit can process tags files generated using the Unix ctags command. Ctags creates index files correlating names of functions and declarations with their locations in C, Fortran, or Pascal source code files. (See the ctags manual page for more information). Ctags produces a file called "tags" which can be loaded by NEdit. Once loaded, the information in the tags file enables NEdit to go directly to the declaration of a highlighted function or data structure name with a single command. To load a tags file, select "Load Tags File" from the File menu and choose a tags file to load, or specify the name of the tags file on the NEdit command line:

nedit -tags tags

NEdit can also be set to load a tags file automatically when it starts up. Setting the X resource nedit.tagFile to the name of a tag file tells NEdit to look for that file at startup time (see Customizing NEdit). The file name can be either a complete path name, in which case NEdit will always load the same tags file, or a file name without a path or with a relative path, in which case NEdit will load it starting from the current directory. The second option allows you to have different tags files for different projects, each automatically loaded depending on the directory you're in when you start NEdit. Setting the name to "tags" is an obvious choice since this is the name that ctags uses.

To find the definition of a function or data structure once a tags file is loaded, select the name anywhere it appears in your program (see Selecting, Cutting and Pasting) and choose "Find Definition" from the Search menu.



Shifting Left/Right (Block Indenting)

While shifting blocks of text is most important for programmers (See Features for Programming), it is also useful for other tasks, such as creating indented paragraphs.

To shift a block of text one tab stop to the right, select the text, then choose Shift Right from the Edit menu. Note that the accelerator keys for these menu items are Ctrl+9 and Ctrl+0, which correspond to the right and left parenthesis on most keyboards. Remember them as adjusting the text in the direction pointed to by the parenthesis character. Holding the Shift key while selecting either Shift Left or Shift Right will shift the text by one character.

It is also possible to shift blocks of text by selecting the text rectangularly, and dragging it left or right (and up or down as well). Using a rectangular selection also causes tabs within the selection to be recalculated and substituted, such that the non-whitespace characters remain stationary with respect to the selection.



Text Filling (Word Wrap)

The Fill Paragraph command in NEdit is important for anyone who types plain blocks of text. In a plain text file, there is no way to store any additional format information, like a word processor might do. This makes it impossible for the editor to tell parts of the text belong together as a paragraph, from carefully arranged individual lines. So, unlike a word processor, when you begin editing a paragraph in NEdit, nicely arranged by Auto Wrap when you entered it, the lines become messy and uneven.

Since NEdit can't act automatically to keep your text lined up, you need to tell it explicitly where to operate, and that is what Fill Paragraph is for. It arranges lines to fill the space between two margins, wrapping the lines neatly at word boundaries. Normally, the left margin for filling is inferred from the text being filled, the left edge of the text, or the furthest left non-whitespace character. The right margin is either the Wrap Margin, set in the preferences menu (by default, the right edge of the window), or can also be chosen on the fly by using a rectangular selection (see below).

There are three ways to use Fill Paragraph. The simplest is, while you are typing text, and there is no selection, simply select Fill Paragraph (or type Ctrl+J), and NEdit will arrange the text in the paragraph adjacent to the cursor. A paragraph, in this case, means an area of text delimited by blank lines.

The second way to use Fill Paragraph is with a selection. If you select a range of text and then chose Fill Paragraph, all of the text in the selection will be filled. Again, continuous text between blank lines is interpreted as paragraphs and filled individually.

The third way to use Fill Paragraph is with a rectangular selection. Fill Paragraph treats rectangular selections differently from other commands. Instead of simply filling the text inside the rectangular selection, NEdit interprets the right edge of the selection as the requested wrap margin. Text to the left of the selection is not disturbed (the usual interpretation of a rectangular selection), but text to the right of the selection is included in the operation and is pulled in to the selected region.



Using the Mouse

NEdit is one of the most mouse interactive text editors around, but you don't need to know all of the details below to be productive. You can get by with just the left mouse button, clicking to move the cursor, and dragging to make a selection.

This section will make more sense if you also read the section called, Selecting, Cutting and Pasting, which explains the terminology of selections, i.e. what is meant by primary, secondary, rectangular, etc.

The general meaning of mouse buttons and modifier keys is as follows:

Buttons

Button 1 (left)

Cursor position and primary selection

Button 2 (middle)

Secondary selections, and dragging and copying primary selection

Modifier keys

Shift

On primary selections, (left mouse button): Extends selection to the mouse pointer
On secondary and copy operations, (middle): Toggles between move and copy

Ctrl

Makes selection rectangular or insertion columnar

Alt

(on release) Exchange primary and secondary selections.

 

Button 1

The left mouse button is used to position the cursor and to make primary selections.

Click

Moves the cursor

Double Click

Selects a whole word

Triple Click

Selects a whole line

Quadruple Click

Selects the whole file

Shift Click

Adjusts (extends or shrinks) the selection, or if there is no existing selection, begins a new selection between the cursor and the mouse.

Ctrl+Shift+Click

Adjusts (extends or shrinks) the selection rectangularly.

Drag

Selects text between where the mouse was pressed and where it was released.

Ctrl+Drag

Selects rectangle between where the mouse was pressed and where it was released.

Button 2

The middle mouse button is for making secondary selections, and copying and dragging the primary selection

Click

Copies the primary selection to the clicked position.

Shift+Click

Moves the primary selection to the clicked position, deleting it from its original position.

Drag

Outside of the primary selection: Begins a secondary selection.
Inside of the primary selection: Moves the entire selection by dragging.

Ctrl+Drag

Outside of the primary selection: Begins a rectangular secondary selection.
Inside of the primary selection: Drags the selection in overlay mode (see below).

 

When the mouse button is released after creating a secondary selection:

No Modifiers

If there is a primary selection, replaces it with the secondary selection. Otherwise, inserts the secondary selection at the cursor position.

Shift

Move the secondary selection, deleting it from its original position. If there is a primary selection, the move will replace the primary selection with the secondary selection. Otherwise, moves the secondary selection to to the cursor position.

Alt

Exchange the primary and secondary selections.

 

While moving the primary selection by dragging with the middle mouse button:

Shift

Leaves a copy of the original selection in place rather than removing it or blanking the area.

Ctrl

Changes from insert mode to overlay mode (see below).

Escape

Cancels drag in progress.

 

Overlay Mode

Normally, dragging moves text by removing it from the selected position at the start of the drag, and inserting it at a new position relative to to the mouse. When you drag a block of text over existing characters, the existing characters are displaced to the end of the selection. In overlay mode, characters which are occluded by blocks of text being dragged are simply removed. When dragging non-rectangular selections, overlay mode also converts the selection to rectangular form, allowing it to be dragged outside of the bounds of the existing text.

 

Alt Key

The Alt key may be labeled Meta or Compose-Character on some keyboards. Some window managers, including default configurations of mwm, bind combinations of the Alt key and mouse buttons to window manager operations. In NEdit, Alt is only used on button release, so regardless of the window manager bindings for Alt-modified mouse buttons, you can still do the corresponding NEdit operation by using the Alt key AFTER the initial mouse press, so that Alt is held while you release the mouse button. If you find this difficult or annoying, you can re-configure most window managers to skip this binding, or you can re-configure NEdit to use a different key combination.



Keyboard Shortcuts

Most of the keyboard shortcuts in NEdit are shown on the right hand sides of the pull-down menus. However, there are more which are not as obvious. These include; dialog button shortcuts; menu and dialog mnemonics; labeled keyboard keys, such as the arrows, page-up, page-down, and home; and optional Shift modifiers on accelerator keys, like [Shift]Ctrl+F.

Menu Accelerators

Pressing the key combinations shown on the right of the menu items is a shortcut for selecting the menu item with the mouse. Some items have the shift key enclosed in brackets, such as [Shift]Ctrl+F. This indicates that the shift key is optional. In search commands, including the shift key reverses the direction of the search. In Shift commands, it makes the command shift the selected text by a whole tab stop rather than by single characters.

Menu Mnemonics

Pressing the Alt key in combination with one of the underlined characters in the menu bar pulls down that menu. Once the menu is pulled down, typing the underlined characters in a menu item (without the Alt key) activates that item. With a menu pulled down, you can also use the arrow keys to select menu items, and the space or enter keys to activate them.

Keyboard Shortcuts within Dialogs

One button in a dialog is usually marked with a thick indented outline. Pressing the Return or Enter key activates this button.

All dialogs have either a Cancel or Dismiss button. This button can be activated by pressing the Escape (or Esc) key.

Pressing the tab key moves the keyboard focus to the next item in a dialog. Within an associated group of buttons, the arrow keys move the focus among the buttons. Shift+Tab moves backward through the items.

Most items in dialogs have an underline under one character in their name. Pressing the Alt key along with this character, activates a button as if you had pressed it with the mouse, or moves the keyboard focus to the associated text field or list.

You can select items from a list by using the arrow keys to move the selection and space to select.

In file selection dialogs, you can type the beginning characters of the file name or directory in the list to select files

Labeled Function Keys

The labeled function keys on standard workstation and PC keyboards, like the arrows, and page-up and page-down, are active in NEdit, though not shown in the pull-down menus.

Holding down the control key while pressing a named key extends the scope of the action that it performs. For example, Home normally moves the insert cursor the beginning of a line. Ctrl+Home moves it to the beginning of the file. Backspace deletes one character, Ctrl+Backspace deletes one word.

Holding down the shift key while pressing a named key begins or extends a selection. Combining the shift and control keys combines their actions. For example, to select a word without using the mouse, position the cursor at the beginning of the word and press Ctrl+Shift+RightArrow. The Alt key modifies selection commands to make the selection rectangular.

Under X and Motif, there are several levels of translation between keyboard keys and the actions they perform in a program. The "Customizing NEdit", and "X Resources" sections of the Help menu have more information on this subject. Because of all of this configurability, and since keyboards and standards for the meaning of some keys vary from machine to machine, the mappings may be changed from the defaults listed below.

Effect of Modifier Keys

Ctrl

Extends the scope of the action that the key would otherwise perform. For example, Home normally moves the insert cursor the beginning of a line. Ctrl+Home moves it to the beginning of the file. Backspace deletes one character, Ctrl+ Backspace deletes one word.

Shift

Extends the selection to the cursor position. If there's no selection, begins one between the old and new cursor positions.

Alt

When modifying a selection, makes the selection rectangular.

(For the effects of modifier keys on mouse button presses, see the section titled "Using the Mouse")

 

Miscellaneous Shortcuts

Arrow Keys

Left

Move the cursor to the left one character

Ctrl+Left

Move the cursor backward one word (Word delimiters are settable, see Customizing NEdit, and X Resources)

Right

Move the cursor to the right one character

Ctrl+Right

Move the cursor forward one word

Up

Move the cursor up one line

Ctrl+Up

Move the cursor up one paragraph. (Paragraphs are delimited by blank lines.)

Down

Move the cursor down one line.

Ctrl+Down

Move the cursor down one paragraph.

All Keyboards

Escape

Cancels operation in progress: menu selection, drag, selection, etc. Also equivalent to cancel button in dialogs.

Backspace

Delete the character before the cursor

Ctrl+Backspace

Delete the word before the cursor

Ctrl+Return

Return with automatic indent, regardless of the setting of Auto Indent.

Shift+Return

Return without automatic indent, regardless of the setting of Auto Indent.

Ctrl+Tab

Insert an ascii tab character, without processing emulated tabs.

Alt+Ctrl+<c>

Insert the control-code equivalent of a key <c>

Ctrl+/

Select everything (same as Select All menu item or ^A)

Ctrl+\

Unselect

Ctrl+U

Delete to start of line

PC Standard Keyboard

Ctrl+Insert

Copy the primary selection to the clipboard (same as Copy menu item or ^C) for compatibility with Motif standard key binding

Shift+Ctrl+Insert

Copy the primary selection to the cursor location.

Delete

Delete the character before the cursor. (Can be configured to delete the character after the cursor, see Customizing NEdit, and X Resources)

Ctrl+Delete

Delete to end of line.

Shift+Delete

Cut, remove the currently selected text and place it in the clipboard. (same as Cut menu item or ^X) for compatibility with Motif standard key binding.

Shift+Ctrl+Delete

Cut the primary selection to the cursor location.

Home

Move the cursor to the beginning of the line.

Ctrl+Home

Move the cursor to the beginning of the file.

End

Move the cursor to the end of the line.

Ctrl+End

Move the cursor to the end of the file.

PageUp

Scroll and move the cursor up by one page.

Ctrl+PageUp

Scroll and move the cursor left by one page.

PageDown

Scroll and move the cursor down by one page.

Ctrl+PageDown

Scroll and move the cursor right by one page.

F10

Make the menu bar active for keyboard input (Arrow Keys, Return, Escape, and the Space Bar)

 

Specialty Keyboards

On machines with different styles of keyboards, generally, text editing actions are properly matched to the labeled keys, such as Remove, Next-screen, etc.. If you prefer different key bindings, see the heading titled "Binding Keys to Actions" in the X RESOURCES section below.


Next Section