The Easy Code 2 Editor


Each module (and Window object in visual projects) has its own editor. The editor always works in Unicode mode, in order to support all languages, and can be splitted so that you can have two windows in one:

You can customize the editor colors, font, and many other options in the Editor tab of the "Tools-->Settings" menu.

Keywords may be automatically corrected and beautified when changing from a line to another, according to different options set in the Syntax tab of the "Tools-->Settings" menu. You can convert and beautify the whole text by selecting the "Tools-->Beautify syntax" menu or by pressing the F11 key when the editor has te focus, but take into account that the results may vary according to the editor settings. When moving the cursor from a line to another, if the previous line was modified, it is corrected and beautified 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 just before moving the cursor and the line will remain unchanged.

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 the .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. However you can still avoid it by disabling the corresponding options.

When opening an include file from the node named Includes, in the Project Explorer, if it belongs to a reserved include folder, it will be open in read-only mode in order to avoid undesired changes (those files should not be modified). However, you will be able to modify it by pressing Ctrl+Shift+F2.


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 "Call", "Invoke", "ECInvoke", "stdcall" or "fastcall" word, 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. That 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 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.

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 in the Project Properties. If not, only the variables and constants being in the same module will be displayed (those 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.