NEdit (Versions 5.5, 5.4, 5.2 & 5.11)



Documentation
Features
New in version 5.5
New in version 5.4
New in version 5.2
New in version 5.1
New in version 5.0
Getting Started
Compatibility with previous versions

NEdit is a standard GUI (Graphical User Interface) style text editor for programs and plain-text files. Users of Macintosh and MS Windows based text editors should 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 freely distributed under the terms of the Gnu General Public License. It is available in both source and executable forms by anonymous ftp to ftp.nedit.org.

Documentation

For discussion with other NEdit users, or to receive notification of new releases and news about news, you can subscribe to one or both of the nedit mailing lists, discuss@nedit.org, and announce@nedit.org. The NEdit on-line help has information on subscribing under Help -> Mailing Lists.

If you have a question about NEdit, you may find the answer in the NEdit FAQ.

Features

Efficient, proven command set

  • Very complete functionality. NEdit is the primary editor for thousands of Unix and VMS programmers
  • Thorough consistency with Motif, MS Windows, and Macintosh conventions
  • Designed for intensive use: keystroke efficiency, fast response time, streamlined interaction
  • Unlimited undo

100% GUI from the ground up

  • True multi-window, fully graphical design
  • Mouse based editing
  • Secondary/quick action selections
  • Fully integrated rectangular selection
  • Interactive WYSIWYG dragable selections
  • Maximum compatibility with X, Motif, and inter-client protocols, for interaction with the widest possible range of X programs and systems.

Easy to learn

  • Just point and type
  • Capabilities are clearly organized and presented in top-level menus
  • Comprehensive on-line help
  • No special knowledge of X Windows required, all important options are GUI-settable within the program

Features for programmers

  • State of the art syntax highlighting with built-in patterns for C, C++, Java, Ada, FORTRAN, Pascal, Yacc, Perl, Python, Tcl, Csh, Awk, HTML, LaTeX, VHDL, Verilog, and more.
  • Auto-indent, programmable language-sensitive smart-indent
  • Block indentation adjustment
  • Parenthesis flashing and matching
  • Find lines directly from compiler error output
  • Tab emulation
  • Unix ctags support
  • Client/Server mode forintegration with software development tools

Programmable

  • Learn / Replay
  • Easy to use C-like macro language, safe and fully interruptable
  • Includes a library of over 150 built-in editing functions

Easy installation

  • Self contained single executable file
  • Pre-built, tested executables available for Silicon Graphics, Sun (Solaris & SunOS), HP, Digital Unix, Ultrix, IBM AIX, Linux, and VMS systems

New in version 5.5

The most significant enhancements in this release are:

  • The most important new feature is the introduction of window tabs.
  • More efficient string search operations for the macro language.
  • Auto-scrolling is now (partly) configurable through the preference menu.
  • Find and Clear buttons for i-search bar.
  • Faster user-defined menu creation.
  • Open documents on current desktop.
  • Superuser receives a warning when trying to overwrite a read-only file.
  • Simplified global font resources.
  • Macro language: added new $args[] array and removed 9 arguments limit for macros
  • Improved Latex & Python syntax highlighting patterns

For a more detailed description of these new features and a list of important bug fixes, see the NEdit Release Notes for more details.

New in version 5.4

The most significant enhancements in this release are:

  • Calltips
  • Rangesets
  • Backlighting
  • Highlighting information macros
  • Full mouse wheel support (on XFree86 servers)
  • Look-behind matching for regular expressions
  • Regular expression and syntax highlighting speed-ups
  • Flexible resource file location
  • Color dialog
  • Option to auto-hide mouse pointer while typing
  • Option to keep cursor away from top and bottom of the screen
  • Check for real changes of externally modified files
  • Synchronized interaction between nc and nedit
  • Several smaller improvements on usability and speed
  • Several smaller improvements to the macro language

New in version 5.2

The most significant enhancements in this release are:

  • Added built-in patterns for CSS, XML, and regular expressions (Regex). Many other pattern updates.
  • Support for high- and true-color systems. NEdit now will automatically select the best visual from your X server. This reduces the chance of running out of colors.
  • New features in the Find and Replace dialogs:
    • Replacement across multiple windows in a session.
    • Case sensitivity may be set independently of regular expressions.
    • A "Replace and Find" command, which saves keystrokes when doing a large-scale find & replace.
  • Many new macro subroutines and variables.
  • Multidimensional associative arrays for the macro language.
  • Support for wheel mouse scrolling on servers that support it (XFree86).

New in version 5.1

The most significant enhancements in this release are:

  • New regular expression code, boosts highlighting performance by 40%, and introduces many new and powerful features to regular expression operations and syntax highlighting.
  • Incremental search, and optional search bar.
  • New ctags code with full support for Exuberant Ctags, better handling of tag collisions, multiple tag file support, on-demand loading of tag files, and automatic reload of modified tag files.
  • Optional display of line numbers along the left side of the text.
  • NEdit can now read and write MS DOS format files.
  • New built-in syntax highlighting patterns for Lex, PostScript, SQL, a greatly improved SGML/HTML pattern. Many minor improvements to other patterns.
  • Improved international character set input.
  • New macro subroutines: list_dialog, getenv, set_language_mode.
  • Optional warnings about external modifications to files.
  • Clearcase awareness.
  • Session manager restart capability.
  • Default language mode "*" for user-defined menu items, allows per-language variations on a common base.
  • Allow additional modifiers like Sun diamond key in user defined accelerator.
  • Option to sort open previous menu.
  • -geometry and -iconic command line arguments act per-window, and can be specified via nc.
  • -geometry now specified in characters, rather than pixels.
  • -lm (language mode) command line option.
  • Save As dialog defaults to same file name.
  • Better default fonts for Linux system.
  • .nedit file version mechanism to make future upgrades easier.

New in version 5.0

  • Word-selection (double click) can be used to select ranges of delimiters.
  • New built-in macro variables: $line, $column, and $modified.
  • Smart-indent mode available for Python language.
  • Minor improvements in default pattern sets for NEdit Macros, X Resources, and Sh/Ksh/Bash.
  • Repeat-over-range, and repeat-to-end capability for repeating last. command and learn/replay sequence.
  • Import capability for loading macro/shell menu commands, highlight patterns, and style sets created by other users.
  • New macro language routines: string_to_clipboard, clipboard_to_string, toupper, tolower, variables: $em_tab_dist.
  • Sorted Open Previous menu.
  • Syntax highlighting. Built-in patterns for C, C++, Java, Fortran, Pascal, ada, Perl, Python, Tcl, Awk, Csh, HTML, LaTeX, VHDL, Verilog, and more.
  • Programmable Smart indent. (Experimentally, at least. There are only macros for C and C++, and they may not fit everyone's programming style.)
  • Completed macro extension language. (Simple C/awk-like syntax, safe, fully interruptable.)
  • Language-sensitive preferences.
  • Continuous wrap mode (long line wrapping), in addition to existing automatic-newline wrapping.
  • User-defined menus can be hierarchical and language-sensitive.
  • Configurable right-button pop up menu.
  • Pan-scrolling.
  • Searchable on-line help.
  • Word boundary matching (<>) in regular expressions.
  • Repeat command.
  • More dialogs have up-arrow recall.
  • White-space selection via double-click.

Getting Started

On-line help is available from the pulldown menu on the far right of the menu bar. Help sections of interest to new users are listed under the Basic Operation heading in the top-level Help menu:

Programmers should also read the introductory section under the Features for Programming section:

If you get into trouble, the Undo command in the Edit menu can reverse any modifications that you make. NEdit does not change the file you are editing until you tell it to Save.

Running NEdit

If you are accessing a host Unix system from a remote workstation or X terminal, you need to set the Unix environment variable for your display (i.e. for csh or tcsh)

% setenv DISPLAY devicename:0

where devicename is the network node name of the workstation or X terminal where you are typing.

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 of 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.

For more information on the syntax of the nedit command line, look under the heading of Help -> NEdit Command Line.

Note: Start NEdit Version 5.5 via commands nedit55, NEdit Version 5.4 via commands nedit and nedit54, NEdit Version 5.1.1 via command nedit511.

Changing Menu Accelerator Keys

The menu shortcut keys shown at the right of NEdit menu items can be changed via X resources. For example, to change Cut, Copy and Paste to Ctrl+X, Ctrl+C and Ctrl+V you would add the following to your .Xdefaults file:

nedit*editMenu.cut.accelerator: Ctrl<Key>x
nedit*editMenu.cut.acceleratorText: Ctrl+X
nedit*editMenu.copy.accelerator: Ctrl<Key>c
nedit*editMenu.copy.acceleratorText: Ctrl+C
nedit*editMenu.paste.accelerator: Ctrl<Key>v
nedit*editMenu.paste.acceleratorText: Ctrl+V

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

For details see the topics X Resources and Key Binding in NEdit Help.

Compatibility with previous versions

Existing .nedit Files

As of version 5.1, NEdit employs a built-in upgrade mechanism which will automatically detects .nedit files of older versions. In general, NEdit will try to convert and insert entries to match the latest version. However, in certain cases where the user has customized the default entries, NEdit will leave them untouched (except for possible syntactic conversions). As a result, the latest syntax highlighting patterns for certain languages may not get activated, for instance, if the user has customized the entries. The latest default patterns can always be activated through the Preferences -> Default Settings -> Syntax Highlighting -> Recognition Patterns menu, though.

Next, some version specific upgrading issues are listed. Note that non-incremental upgrading (eg., from 5.0 to 5.2) is supported too.

Upgrading from 5.4 to 5.5
  • Changes in the widget hierarchy, possibly effecting resource settings

    In NEdit 5.4 and below, the widget hierarchy consisted of a separate widget tree for each window. This was rather unconventional and caused certain problems. In 5.5, the hierarchy was changed such that all widgets belong to a single tree with a single root widget.

    For instance, with 5.4, the top of the widget hierarchy for a 2-window NEdit session looks as follows:

    NEdit nedit
    +-- XmMainWindow main
    NEdit nedit
    +-- XmMainWindow main
    In 5.5, the same session results in the following tree:
    NEdit nedit
    +-- TopLevelShell  textShell
    | +-- XmMainWindow main
    +-- TopLevelShell textShell
    +-- XmMainWindow main
    Users with advanced X-resource settings may be affected by this change and may have to adapt their resource specifications.
  • Minor change to the regular expression word boundary semantics

    In 5.4, the semantics for word boundary regular expressions ('<', '>', and '\B') were changed to behave in a more intuitive way (see Upgrading from 5.3 to 5.4 below). However, this introduced an inconsistency between the regular expressions and several other places in NEdit where word boundaries were taken into account. Therefore, the changes were partially reverted to restore consistency, but without giving up the benefits of the more intuitive word boundary definition. More in particular, a boundary between two characters is now considered to be a word boundary only if exactly one of the characters is a delimiter. This change will have little or no consequences for most users.

Upgrading from 5.3 to 5.4
  • Resource syntax

    Basic colors, like the text foreground and background, are now true preferences. A new dialog (Preferences > Default Settings > Colors) is provided to change them, previously only changeable from X resources. Upon starting, NEdit will migrate any custom colors you have set from the old X resources. Most users will not need to do anything.

    However, if you used X resources to dynamically change the colors on different invocations, you will need to use the new application-level resources instead. See the .nedit file for details.

    In 5.3, color resources needed to be qualified by "nedit*" in order to prevent problems when the deepest color visual was not the default. This is no longer necessary, and the qualification may be removed.

  • New location of configuration files

    The default location and name of NEdit's resource files has been changed. The most important change is the fact that they can now be stored in a custom directory, defined by the NEDIT_HOME environment variable. If the variable is not set, the directory defaults to ~/.nedit. The files have been renamed as follows:

    ~/.nedit --> $NEDIT_HOME/nedit.rc
    ~/.neditmacro --> $NEDIT_HOME/autoload.nm
    ~/.neditdb --> $NEDIT_HOME/nedit.history

    For backward compatibility reasons, NEdit continues to use the old convention when these files are already present. No attempt is made to force the user to adopt the new convention.

    Users that would like to migrate to the new setup can do so manually by moving and renaming the files.

  • Changed regular expression word boundary semantics and its effect on the syntax highlighting patterns.

    During the 5.4 development cycle, it was noted that the implementation of NEdit's regular expression word boundary matching was rather unconventional. More in particular, the '<', '>', and '\B' patterns interpreted the boundary between any two characters of which at least one was not a word character as a word boundary. A striking effect of this was that the boundary between two spaces was considered to be a word boundary, which is obviously rather unintuitive. This has been corrected in 5.4: the boundary between two characters is a word boundary, only if exactly one of them is a word character.

    Several of the built-in syntax highlighting patterns (implicitly) relied on the old word boundary interpretation and they have been corrected too.

    However, if the user has customized some of these buggy built-in highlighting patterns, the automatic upgrading routines will NOT upgrade them in order not to loose any customizations. It is left up to the user to correct his/her customized patterns manually (using the corrected built-in patterns as a guideline).

    The following is a list of all language modes and patterns that have been corrected:

    Ada: Based Numeric Literals
    Awk: Numeric constant
    C++: numeric constant
    C: numeric constant
    CSS: property, selector pseudo class
    Java: decimal const, case numeric const
    JavaScript: Numeric
    Lex: numeric constant, markers
    Matlab: Numeric const
    NEdit Macro: Built-in Vars, Numeric Const
    Pascal: TP Numeric Values:
    Perl: dq string, sq string, bq string, subroutine call, numerics, re match
    PostScript: Number, Operator1
    Python: Number
    SQL: data types, keywords2
    Sh Ksh Bash: keywords, built ins
    Tcl: Keywords
    VHDL: Numeric Literals
    Verilog: Reserved WordsA, Numeric Literals, Delay Word, Pins Declaration
    XML: element declaration keyword
    Yacc: numeric constant, percent keyword, markers

    So, if the user has customized the highlighting definitions for any of these language modes (not restricted to the listed patterns), (s)he is strongly advised to restore the default patterns in the syntax highlighting dialog and to re-apply his/her customizations.

    Moreover, it is advised to check any custom language modes for potential boundary matching problems as described above.

Upgrading from 5.2 to 5.3

There are no major changes in the format of the .nedit file for version 5.2. Users that have customized the X Resources syntax highlighting pattern may consider restoring the default patterns, as they resolve a performance issue when editing the .nedit file itself, for instance.

Upgrading from 5.1 to 5.2

There are no major changes in the format of the .nedit file for version 5.2. NEdit will try to insert additional entries for the newly supported language modes and syntax highlighting patterns (CSS, Regex, and XML) and highlight styles (Pointer, Regex, Warning). Moreover, the formerly boolean "showMatching" option will silently be converted to a tri-state value. Users that have customized some of the syntax highlighting patterns may consider restoring the default patterns, as many of them have been improved considerably.

Upgrading from 5.0 to 5.1

NEdit 5.1 makes significant changes to the syntax of regular expressions. Mostly, these are upward compatible, but two changes; introducing the brace operator, and changing the meaning of \0; are not. Brace characters must now be escaped with backslash, and & must be used in place of \0 in substitutions.

NEdit 5.1 employs a built-in upgrade mechanism which will automatically detect pre-5.1 .nedit files and fix regular expressions which appear in user-defined highlight patterns. The automatic upgrade mechanism, however, can not fix regular expression problems within user-defined macros. If you have a macro which is failing under NEdit 5.1, you will have to fix it by hand.

Upgrading from pre-5.0

If you are upgrading from a pre-5.0 version of NEdit, there are significant changes to the macro language, and you are best off simply editing out the nedit.macroCommands section of your .nedit file, generating a new .nedit file, and then re-introducing your user-written commands into the new file. Most macros written for previous versions will function properly under the new macro language. The most common problems with old macros is lack of a terminating newline on the last line of the macro, and the addition of "<", ">", and now "{" to the regular expression syntax. These characters must now be escaped with \ (backslash). Also, if you have been using a font other than the default for the text portion of your NEdit windows, be sure to check the Preferences -> Default Settings -> Text Font dialog, and select highlighting fonts which match your primary font in size. Matching in height is desirable, but not essential, and sometimes impossible to achive on some systems. When fonts don't match in height, turning on syntax highlighting will cause the window size to change slightly. NEdit can handle unmatched font sizes (width), but leaving them unmatched means sometimes columns and indentation don't line up (as with proportional fonts).

Nach oben scrollen