X2 Editor Screen Shot

The following figure shows a sample editor screen, when editing a small C source file.

Sample Editor Screen

This sample illustrates the main areas of the screen:

The filename in the sample is in the top left hand corner of the screen, and is d:\x\demo.c. The filename is displayed in light red, which in the default configuration is the mod_filename colour and means the file has been altered since it was last saved.
Status Area
This area is located on the top line of the screen, on the right hand side. It begins with the hexadecimal representation of the current character (a blank in the sample), and is followed by the file column and row number, the total number of lines in the file, the alteration count, and the insert/replace indicator.
Command Line
This is the line used to execute commands against the editor. It is only displayed when active; when the cursor is in the data the command line is hidden by data. In the sample screen the command line is active; it is the line immediately below the status line which covers the entire screen width, and contains the command /char.
Command Stack
This is a window of previously executed commands which is displayed immediately beneath the command line. Like the command line, it is only displayed when necessary. A current line is displayed on the command stack window, which can be moved up and down with the cursor keys. Selecting a command stack line will copy the stack contents to the command line.
Data Area
The data area is the area of the screen used to display the file contents. All lines of the data area may be modified by overtyping, as long as the file is not loaded in Browse mode. The data area can contain lines with varying emphasis - this example shows comments, quoted strings, keywords, alternate keywords, and error lines.
In the sample file, these are delimited by the normal C language strings of /* and */, and are displayed in dark blue. There are two kinds of comments displayed: Block comments, which span the entire line, and Inline comments which are on the same line as some code.
Marked area
The marked text in the example is displayed with a light grey colour on a black background. There are two main types of marks in X2: line marks and block marks. Block marks are always rectangular and have borders at both lines and columns. Line marks mark the entire line, so do not have column borders. The mark in the example is a block mark.
Quoted strings
The string in quotes, "Hello World!" is highlighted in light blue colour. Note that the mark overlaps part of the string, but does not affect the colour of the part of the string that is not marked.
X2 provides the ability to define a list of words that are to be highlighted in a different colour. In the example, the keyword if has been highlighted in red.
There are two colours that may be used to highlight sets of keywords. The default alternate keyword highlighting is yellow on a black background. The keyword #include has been highlighted with alt_keyword emphasis.
Error line
The /ERR command line option instructs the editor to look for a .ERR file and insert any compiler errors directly into the source file. These lines are read only, and highlighted in magenta in the sample. The warning message displayed in the example is error EDC0068 from the VisualAge C++ compiler.
Shadow cursor
When the command line is active, the current location in the data is shown with a shadow cursor. The shadow cursor in the example is located on the line immediately below the E in EDC0068.
Shadow line
When lines have been excluded from the display, their place is marked by a shadow line which indicates how many lines have been hidden. Six lines have been hidden in the example. The shadow line itself may be hidden with the SHADOW command.
Help line
The last line on the screen is reserved for the help line. This line is overlaid by warning or error messages when necessary, but normally it shows the settings for the main function keys. If you press and hold any of the Ctrl, Alt, or Shift keys the help text will change to show the function keys that are in effect with the various keys. If CapsLock is active the help text will change to all upper case.