The Easy Code Editor


Each module (and window object in visual projects) has its own editor. The editor has been programmed in assembler, using Easy Code. It has a surprising speed and quickness and it can be splitted, so that you can have two windows in one. It looks like this:

If you like, the check box option Show line numbers in the Editor tab of the "Tools-->Settings" menu, makes the editor to show line numbers. Besides, you can select the color for those numbers in the last item of the Code colors list box:

Keywords may be automatically corrected when changing from a line to another, according to different options set in the Editor tab of the "Tools-->Settings" menu. When the editor has the focus, you can convert the whole text keyword syntax to the Easy Code style, by selecting menu "Tools-->Correct syntax" or by pressing the <F11> key, but take into account that this option is case insensitive. When using this option, the results may vary according to the editor settings. Keywords and reserved words syntax is always corrected in Easy Code style (first character upper and the rest lower) and lines may be formatted only if options: Trim left spaces and tabs or Trim middle spaces and tabs (or both) are enabled. When moving the cursor from a line to another, if the previous line was modified it is corrected in the same way. If you do not want any correction for a given line without having to disable the corresponding options, press the <F12> key before moving the cursor and the line will not be corrected.

To make syntax correction as accurated and smart as possible, the editor searches up for the word ".Code" (case insensitive) in order to know whether the line being corrected is inside .Code section or not. So, if any window or module does not have this word (it always should), apart from working very slowly, correction can behave strangely, but you can still avoid it by disabling the corresponding options.

When opening an include file, that is, from the tree view node named Includes in the Project explorer, if it belongs to include folder, it will be open in read-only mode in order to avoid undesired changes in files belonging to Masm32 and/or GeneSys. You should never modify any of those include files from the Masm32 or GeneSys include folder. Anyway, as any other include file in the project being in the same tree view node, you will be able to modify it by pressing Ctrl+Shift+F2.

Also, you can manage bookmarks from the editor. For more information, please see the Bookmarks topic.


Context help

Easy code offers you some useful context help while typing, or by pressing some key combinations. This help can be customized according to the settings specified in the Editor tab of the "Tools-->Settings" menu.

After typing the words "Call" or "Invoke" plus a blank (<Space> or <Tab> keys), the editor displays a list box containing all API functions, Easy Code methods (only for visual projects) and existing procedures. Only public procedures in the project will be inside the list box and those private procedures being in the same window or module, that is, all procedures which are under scope (this list box can be displayed at any time by pressing Ctrl+I).

After typing a colon character (:), a list box with all variable types and Windows structures will be displayed.

After typing any API function, Easy Code method (only for visual projects) or procedure name plus a comma, a window with the complete prototype and required parameters will be displayed.

Pressing Ctrl+I will display a list box containing all API functions, Easy Code methods (only in visual projects) and procedures.
Pressing Ctrl+Shift+I will display a list box containing all API constants.
Pressing Ctrl+J will display a list box containing all variables and constants in the window or module, or in the whole project (see REMARKS).
Pressing Ctrl+Shift+J will display a list box containing all identifiers (ID's) in the project.

Once you have found the needed name in the list box, you can insert its corresponding text into the editor by double-clicking on any item or, if an item is selected, by pressing the <Space> or <Enter> keys. Pressing <Space> will only insert the corresponding text into the editor, while pressing <Enter> will insert the text and a line feed.

REMARKS: When pressing Ctrl+J for classic projects, a list box will be filled with all variables and constants in the project only if the Make all variables global option is enabled (see Project properties). When not, only the variables and constants being in the same module will be displayed (all variables which are under scope). When pressing Ctrl+J for visual projects, a list box will be filled with all Easy Code constants plus all variables and constants from any module in the project (remember that in visual projects, modules are global to the whole project).

WARNING: In some old slow computers, the context help list box may take some time to be displayed.

IMPORTANT: The code editor ALWAYS works in ANSI mode and it needs a fixed-pitch font. Otherwise, the source code will not be properly shown.