editor introduction

The tools distribution comes with a text editing program designed only to edit ascii files in the way that programmers are want to do. The editor is curses based and thus does not support mouse selections -- except those provided by xterm, putty, or whatever terminal emulator you are using. It is designed more like the SPF editor (long deceased) than either EMACS, VI, GEDIT, or any of the modern editors. Like VI, though, it is a strictly line oriented editor. Cross line selections, for example are not supported. Use the F1 key to obtain help, including the function key bindings.

The text editor is actually a package of tools involved in developing software. In addition to editing ascii files, the editor includes the following:

This text editor has the following major features of interest:


The ETAGSPATH environment variable is set to a colon separate list of directories -- much as the command search path is set. This set of directories is used by the editor when it needs to find the TAGS file which is presumably created using the etags program. The TAGS file is read in when either of the following occurs:

This invocation will pop up a form that lets you accept the current symbol or type in a new symbol then press 'Enter'. After which time the symbol will be found by find the name of the file and line number at which the symbol is defined by reading the etags database found in a "TAGS" file found in the ETAGSPATH.


Warning: CDPATH must be exported to make this work and that is generally a severe security violation. Don't do this. Use SOURCEPATH instead.

The CDPATH environment variable is a part of the bourne shell, the korn shell, and bash. In the cshell, it is named 'cdpath', but this is not supported by the editor.

The CDPATH variable specifies a colon separated list of directories in which files and subdirectories lie. Refer to the bourne shell man pages for a description of its general uses. However the editor uses the CDPATH to help find files when the user positions the cursor over a file's name in an edit buffer then presses "^X w e" to bring up an edit session on that file.


The SOURCEPATH and SOURCEALTS environment variables work together in order to define the behavior of the 'switch source command', normally invoked using the F12 key. The switch source command lets you quickly bounce between various source files as defined by the SOURCEALTS variable. For example, if the SOURCEALTS variable is defined like this:

export SOURCEALTS SOURCEALTS=".:.c:.h:..cc"

Then, pressing F12 would switch you quickly between the File.c, File.h, File.cc, and File. This is, of course, assuming that files named File.c, File.h, File.cc, and File can be found in the directories defined by the path defined in SOURCEPATH.

In additional to the normal unix 'PATH' definition strategy (a colon separate list of directories) the SOURCEPATH environment variable also recognizes pattern expansions. So that '*' means all directories in the current directory. So if you want to represent all the sibling directories of the current directory, you can write "../*". An example SOURCEPATH directory setting might look something like this:



The editor knows about program databases generated by cpptagdb.exe and can read and display their output in symbolic form -- which is an indented tree of symbols rather than the flat-file formatted it produces.

The editor knows about two file name extensions:

The first of the two is a real file name extension. If a file name ends in .tagpp, then the VIEWER part of the editor knows how to display it in symbol form. The EDITOR part, however will allow you see the real output of the CppTagDb.exe program. While looking at the symbolic form, you can use the Enter key to jump from a symbol's name to the source file that defines that symbol.

The .cpptagdb extension does not apply to real files but rather tells the editor that it is supposed to run cpptagdb.exe to get the tag information -- which is not saved to any file. The user never types in this file name extension, but rather it is automatically added by the editor whenver the user presses the ^X-0 command sequence or when the user presses the 0 command in the directory viewer.

Note that it is possible to access a program's consolidated database using the ^X-^N command which brings up the list of possible viewers and editors. If you select on SymbolViewer, the editor will begin a search from the current directory up to the system top level directory looking for a file named TAGPP.tagpp. This file is assumed to be the program's consolidated symbol database. This is the best kind of program database file because it will contain all symbols from all files and will not have any gaps in the coverage that will be experienced when you use the ^X-0 or the 0 command. To generate the program's database, use the script scripts/MakeCppTags. You can control which directories it looks at, to limit garbage and speed up its work by creating a makeTags.dirlist script and putting it in the top level directory of your project. See scripts/MakeCppTags for more details.

Generated on Wed Feb 29 22:51:48 2012 for CXXUtilities by  doxygen 1.6.3