Ned the dolphin


features

Of course the functionality doesn't stop at the simple application described earlier. NEdit has many important properties, both behind the scenes and explicitly activated by the user. This feature wouldn't be complete if a number of them weren't mentioned.

memory use

Earlier it was said that NEdit has a very small memory footprint for a graphical editor. That is an important characteristic, but perhaps even more important is the fact that the size of a file that can be loaded is only limited by the amount of available virtual memory. On some locations NEdit is routinely used to edit files of 50MB and more.

undo

The `undo' and `redo' functionality in NEdit is unlimited. The undo stack is not purged after saving a file, or limited to a fixed number of operations. This has its effects on memory use in long edit sessions.

client/server

One very useful property of NEdit is that it can operate in a client/server configuration. Separate server instances can be opened with `nedit', but when a window is opened with `nc' (NEdit client), the client first checks if a server is available. It will open the file in a new window within that server session if this is the case, and start a new server session if necessary. This also significantly limits the amount of memory the editor needs. It is also possible to start a number of servers, all with specific names. All files that are open in a particular server session can be accessed through the `Windows' menu.

language modes

NEdit provides the concept of different language modes for a range of functions. For example, language modes can be defined for programming and markup languages, but also for email or configuration files that require specific properties. Per language module settings can be specified that control aspects such as line wrap, indent size, syntax highlighting, etcetera. Aside from that, entries in the `Shell' and `Macro' menus and the menu under the right mouse button can be made specific to a language mode. These will remain invisible in any other language mode.

syntax highlighting

This is the rendering in color and font face of certain elements of a language (see Figure 1. for HTML). For many people this makes source code more leggible, and it helps prevent errors. In NEdit, syntax highlighting is configured in a collection of hierarchically ordered regular expressions. While many editors offer syntax highlighting, NEdit's approach is much more powerful than most, and also more extensible. Such a collection is commonly referred to as a `pattern set'. NEdit has 25 built-in pattern sets, and on the web site pattern sets are available for some 70 languages, with contributions from all over the world.

regular expressions

As mentioned, regular expressions form the basis for syntax highlighting, but these are also available in search and replace functions. The regular expression library is based on the code by Henry Spencer, but it has been extended to a syntax that resembles Perl's regular expressions.

macros

In order to automate various functions in NEdit, a macro language has been built in, which has a C/Awk-like syntax. NEdit is distributed with macros for word completion and handling C-style comments, to name a few. There also are many macros available from the web site.

One very interesting application of macros is the so called smart indent function. Besides auto-indent (indent to the same extent as the previous line), it is possible to get a macro to run every time the `Enter' key is pressed. This macro can judge how big the indent should become. Smart indent also has a `type in' macro, that is run for every key press. This can be `abused' in HTML to determine every time a `>' is typed, whether a tag of a container element has been entered, and automatically insert the closing tag if this the case. Very useful.

incremental search

Of course NEdit provides conventional ways of searching, but often the intention is to quickly look up a certain word in a text. In those cases it is quite laborious to open a dialog, enter the word, and start the search function. For these occasions incremental searching is the answer. When this function is activated, an additional bar appears in the window, with the possibility to enter a search phrase. The difference with other ways of searching is that with each key press an immediate query is done for the text typed up to that point. This guarantees that the minimum amount of typing is required to achieve the desired result. This function must simply be tried out to understand the power it offers.

other functions

Aside from all that is mentioned above, NEdit also offers many other useful functions, such as the possibility to make rectangular selections (for example columns), or splitting a window so that two or more parts of the same file can be viewed or edited at the same time. Other than that, NEdit can keep an incremental backup, and make automatic copies of every file that is opened. From within the editor a text line can be executed as a shell command by terminating it with the `Enter' key on the numeric key pad. There also is a configurable menu under the right mouse button, in which various useful macros can be placed.

Figure 2: Window layout

Figure 2. The location of the interface elements. Red: the menu bar; green: the incremental search bar; blue: the status line; purple: line numbering; yellow: the effective edit window.

Figure 2. shows the layout of an NEdit window when several interface elements have been activated. The incremental search bar is normally only visible when it is used for searching.

Search nedit.org
Search by Google

Error: RSS file not found...
Niki - Recent changes [en]
Niki

Error: RSS file not found...
Sponsors

hosting and design by
Loco


unless otherwise stated all material is © 1999-2004 NEdit.org