NEdit.org    The Nirvana Editor Web Site
.

NEdit.org Home
Table of Contents

Getting Started

Basic Operation
Selecting Text
Finding/Replacing
Cut and Paste
Using the Mouse
Keyboard Shortcuts
Shifting and Filling
File Format

Features for
Programming

Programming
Tabs/Emul. Tabs
Auto/Smart Indent
Syntax Highlighting
Finding Decl.

Regular Expressions
Basic Syntax
Escape Sequences
Parenthetical Const.
Advanced Topics
Examples

Macro/Shell Extensions
Shell and Filters
Learn/Replay
Macro Language
Macro Subroutines
Action Routines

Customizing
Customizing NEdit
Preferences
X Resources
Key Binding
Highlighting Patterns
Indent Macros

Miscellaneous
NEdit Cmd Line
Client/Server Mode
Crash Recovery
Problems/Defects

.

 

.

Features for Programmers

Though general in appearance, NEdit has many features intended specifically for programmers. Programming-related topics are listed here, and in the next four sections: Tabs and tab emulation, Automatic indent, Syntax Highlighting and Finding Subroutines and data declarations (ctags).

* Language Modes

When nedit initially reads a file, it attempts to determine whether the file is in one of the computer languages that it knows about. Knowing what language a file is written in allows NEdit to assign highlight patterns and smart indent macros, and to set language specific preferences like word delimiters, tab emulation, and auto-indent. Language mode can be recognized from both the file name and from the first 200 characters of content. Language mode recognition and language-specific preferences are configured in: Preferences -> Default Settings -> Language Modes....

You can set the language mode manually for a window, by selecting it from the menu: Preferences -> Language Modes.

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

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.

* Interface to Programming Tools

Integrated software development environments such as SGI's CaseVision and Centerline Software's Code Center, can be interfaced directly with NEdit via the client server interface. These tools allow you to click directly on compiler and runtime error messages and request NEdit to open files, and select lines of interest. The easiest method is usually to use the tool's interface for character-based editors like vi, to invoke nc, but programatic interfaces can also be derived using the source code for nc.

There are also some simple compile/review, grep, ctree, and ctags browsers available in the NEdit contrib directory on ftp.fnal.gov.

 

<< Previous Section
File Format
Table of Contents
Next Section >>
Tabs and Tabs Emulation

 

 

. . Released on  Wed, 6 Nov 2002  by C. Denat