Text editor basics

For this discussion we will assume your have used a text editor and/or a word processor before, so we will discuss the basic editing commands this editor supports. This editor conforms with Windows operating system standards for user interface with text editors, so you probably already know how to use the basic editing functions.

Basic terminology. The Cursor is the mouse pointer. The Caret is the text edit position pointer.

The editor window

Opening files

The File menu open command displays a dialog allowing you to open additional text files or binary files for the binary editor. This dialog displays a list of modules for you to open. These are modules that have been added to your project. You are given some options to control what is displayed in this list. You can also open any file with the binary editor, or any text file that is not a part of the project. To access these options press their respective buttons in the File Open dialog. You can quickly select a module in the open dialog just as you do in the project window. Simply start typing the name of the module. The list selection will be changed as you type the name.

If you right click on a module/package name in the source text, the popup menu will have selections to open the source file(s) for that module/package. If the file is already open then it will be brought to the foreground.

The context menu

The editor window has a context sensitive menu. To access this with the mouse use the right mouse button, and/or if you have a newer keyboard you can press the context menu key. The context menu duplicates many of the menu items from the main menus of the editor window. Notably menu commands from the Edit menu . For mouse users this reduces the amount of mouse movement to select text, and then select a menu command for the selected block of text.

The context menu will add to the context menu modules that can be opened under the following circumstances. When you right click on a symbol name in your source code and that name is the name of a module in your project the source file(s) for the module will  be added to the context menu. If you select one of these items from the context menu the module will be opened.

Moving the text caret

The usual suspects for a conforming windows based editor are found here.

Arrow cursor keys These move the caret by one position.
Page Up, Page Down These scroll the window one page. The caret is not moved.
Home Moves the caret to the first non white space character of the line. If the caret is already at this position then the caret is moved to the first character of the line.
End Moves the caret to the last character of the line.
Ctrl+Home, Ctrl+PageDown Move the caret to the first character and line of the file.
Ctrl+End, Ctrl+PageDown Moves the caret to the last character and line of the file.
Delete Deletes one character to the right of the caret. The caret position remains where it is. If any text is selected then that text block is deleted.
Backspace Deletes the character to the left of the caret and moves the caret position to the left.

As for the mouse, simply point to the location with the mouse cursor where you want to place the caret and click with the left or right mouse button. In the case of the right mouse button the context menu will also then be displayed.

Selecting text, cutting and pasting

To select text using the keyboard simply hold the Shift key down while moving the caret. The text will be selected.

To select text with the mouse point to the starting location you wish to select and click the left mouse button, keep the mouse button depressed and drag the mouse to select your text. Release the mouse button when you are done selecting. If you need to select a region larger than can be displayed in the window simply drag the mouse beyond the edge of the client area of the editor window. The editor will then scroll the window in the direction you moved and it will continue to scroll until the cursor reenters the window client area. Selecting large areas this way can be tedious since the scroll rate is not very quick. A better method is to place the caret at the starting point, then scroll the file to the ending position you want to select and then click the left mouse button while holding the Shift key down.

Double clicking on a word will select the entire word.

Clicking and dragging the cursor in the gutter area selects entire lines at a time.

The selected text block is automatically cleared when you move the caret or enter text. When a text block is selected and you then start entering new text the new text replaces the entire selected block. This behavior can be changed via the Editor Options.

The cut, copy or delete the selected text simply use the Edit menu Cut, Copy and Delete commands. Standard keyboard shortcuts are supplied for these operations.

Indenting source code

It is a safe bet that everyone formats their source code with indentation levels matching the block structure of the language. The indentation feature of the editor is designed to help you with this task.

Whenever you press the Enter key to create a new line the new line is given the same indentation as the line where the caret was previously. This simplifies entering code at a specific indentation level.

To change the indentation levels of your code the editor supports indenting lines and blocks. The Shift left/right indent commands from the Edit menu, will change the indentation of the text by the number of spaces specified in the Shift width editor option. The default for this value is four spaces. The Shift left/right space commands from the Edit menu, will change the indentation of the text by one space. If a text block is selected the entire text block is shifted by both these commands.

Source code line width

The editor supports a feature to display a marker as a visible indication of a right hand margin. You can use this to make it easy to keep your code formatted within a given number of columns. This is useful if you print your source code so that no line wrapping occurs. You can setup this feature via the Editor Options dialog.


The Search menu is where you will find options for searching a file for text. Searching in the text editor is a two stage process involving two dialog boxes. The first dialog is the prompt dialog where you enter the text you want to find and any search options. When you press the Find next, or Replace all buttons the editor tries to find the first occurrence of the string you are searching for. If it does not find the text you will be notified and the prompt dialog will remain on screen. If the editor does find an occurrence of the string the prompt dialog will be closed and a smaller dialog will replace it. This smaller dialog is modeless and will remain on screen so you can switch to the text editor and edit and then click a search button in the search dialog to goto the next or previous match. The smaller search dialog only has buttons in it so you can tuck it out of the way so it does not cover your text window much if at all. If you open a new search and the smaller search dialog is still open the editor will close the smaller dialog for you and open the prompt dialog.

The matched text is displayed selected in the editor window for you to easily find the match visually.

The editor search options are Find, Replace, Find procedure and Find again. Find simply searches for text starting at the current position. Replace searches and replaces text starting at the current position. Find procedure will search for a procedure of a given name from the top of the file downward. You need not enter the full procedure name to get a match. Find again repeats the previous search operation from the current editor location.

Procedure View

When the editor is in procedure view mode the menu item in the Edit menu, will be checked. In this mode only procedure header declarations are shown. You can then use the keyboard and/or mouse to navigate the procedure headers and when you find the one you are looking for you place the caret on the line with the procedure header and press the Enter key or double click the line with the mouse and the edit window will then change back to show all text and the file will be positioned at the procedure you selected. You can cancel a procedure view without changing position by pressing the Esc key, or selecting the procedure view menu item again.

Finding and correcting compilation errors

Compilation errors are a fact of life in software development and the editor supports a simple way to speed up the process of correcting compilation errors. The environment can stop compilation when a error occurs and open source file in the editor automatically for you to correct the errors. You are automatically positioned at the first compilation error. The caret is positioned at the error location and the error message is displayed in the status line. For this the status line is changed to a single field to show the error message. When you move the caret in any way the status line reverts back to the normal editor status information. The Search menu has commands for viewing the next or previous error. Keyboard shortcuts are provided to make this an efficient single keystroke operation. You can restart the stopped build, where it left off, with a single keystroke when you are done correcting compilation errors.

Commenting blocks of code

All languages have mechanisms for comments. In some languages like Ada95 the only comment available only comments the current line. This makes it difficult to comment large sections of code. The editor has a feature to help here. You select the lines you want to act upon and then issue the comment block or un-comment block command from the Edit menu. For languages with single line comments the comment character(s) are places at the front of the line when commenting code, and the comment characters are removed from the front of the line when un-commenting characters. For languages with token comments, like Modula-2, the selected block is surrounded with the comment characters, where the comment characters are placed on their own lines.

Setting position markers

Many times when writing code you need to reference other locations in a file while editing another location. Position markers can be used to help you bounce between various locations. Four position markers are supported numbered 1 though 4. Setting a position mark is as simple as selecting the set marker menu item. A keyboard shortcut is provided to make this simple and fast. This short cut is a multiple keystroke operation. Press Ctrl+S, then let go and then press 1 through 4 for the marker you wish to set. Positioning to a position marker is just as simple with menus or another multiple keystroke keyboard shortcut, this time using Ctrl+G as the initial keystroke and again 1 through 4 for the marker you wish to position to. Position markers are shown in the editor window with a user definable display attribute.

Compiling, Running, Debugging

As a software developer you spend most of your time living in your text editor. It makes sense to be able to compile and link your programs from within the editor. The editor has the same Build menu as the project window. When in the editor, the "selected module" is considered to be the active file being edited. If you have more than one main program module it is beneficial to set a default main program. In this way you can be editing some module in your program and issue a Run, Debug or Link command and the default program will be the one acted on. You never need to leave the editor for normal development operations.

When you issue any build command, all files that are included in the build and are currently open in an editor window will automatically be saved to disk if they have any changes. The build command assumes you wish to have your changes saved to disk and will not bother prompting you about saving to disk.

Setting options

The editor has the same Options menu as the project window. When in the editor, the "selected module" is considered to be the active file being edited. This really only applies to setting local compiler options.

Printing source files

The environment can print your code files with its printing facilities. It has some unique capabilities in that it can print multiple "pages" per sheet of paper. See Page Setup for information on these options.

Automatic correction and expansion

How many times do you type procedure or integer while developing? A lot you say. The editor has a feature to allow you to save some keystrokes for common tasks. See Auto expansion and correction.


Window navigation.

Using the Alt+0 hot key you can always bring the project window to the foreground.

Alt+1 through Alt+9 can be used to bring an editor window to the foreground. The windows are numbered from left to right by their order in the list of selection tabs. These hot keys can also be assigned to open a specific module.

The text editor window can also be converted to a stand alone window via the edit menu.

Miscellaneous functions

Convert a word to all upper case.

Convert a word to all lower case.

Position a specific line number

Match opposing parentheses and bracket characters in an expression.

Match language block elements.

Select a matching module in the multi file match list from a multi file search.

Keyboard shortcuts

The menu always displays the keyboard shortcuts for any menu item which has a shortcut. Therefore when in doubt you can check the menu for any available keyboard shortcut.

Key Function
Ctrl+Z Undo
Ctrl+X Cut
Ctrl+C Copy
Ctrl+V Paste
Delete Delete
F9 Shift left indent
F10 Shift right indent
Shift+F9 Shift left space
Shift+F10 Shift right space
F6 Delete to end of line
F7 Delete line
Ctrl+U Capitalize word
Ctrl+D Downcase word
Alt+Insert Comment block
Alt+Delete Uncomment block
Ctrl+O Open a module or external file
Shift+Ctrl+O Close the current window.
Ctrl+F Find
Ctrl+R Replace
Ctrl+P Find procedure
F3 Find/Replace again
Ctrl+A Find next altered line
Ctrl+M Match symbol
F8 Goto next error
Shift+F8 Goto previous error
Ctrl+G, 1..4 Goto position marker. This is a multi keystroke shortcut. First you press Ctrl+G and then you press 1 though 4 depending on the marker you want to position to.
Shift+S, 1..4 Set position marker. This is a multi keystroke shortcut. First you press Ctrl+S and then you press 1 though 4 depending on the marker you want to set.
Alt+0 Bring the project window to the foreground.
Alt+1..9 User defined editor hot keys. These open a specific module, or bring and editor window to the foreground.
Ctrl+Tab Bring the next tabbed window to the foreground.
Shift+Ctrl+Tab Bring the previous tabbed window to the foreground.
F1 Help

Shortcuts that duplicate the actions of some of the primary keyboard shortcuts.

These are implemented for backwards compatibility.

Key Function
Shift+Delete Cut
Shift+Insert Paste
Ctrl+Insert Copy

Shortcuts for building and options. These are the shortcuts for the Build and Options menus.

Key Function
Alt+C Compile the selected module
Alt+R Run the selected or defualt program
Alt+D Debug the selected or default program
Alt+L Link the selected or default program
Alt+K Link all programs
Alt+P Proceed with the previous build after correcting a compilation error.
F2 Open the global compiler options dialog
Shift+F2 Open the local compiler options dialog for the selected module.