ECoding / Scite

NOTE: UPDATE-ME, This is just a STUB take from old page, needs improving. See Ecoding before using SciTE.

SciTE is a very powerful editor, and with some small arrangements you can make it even more useful for your coding sessions with the EFL, adding autocomplete and calltip (with the help on the parameters of functions) and syntax highlighting.

C source code

Indentation

NOTE: UPDATE-ME, EFL-Coding Style is more than just indent=3. See Ecoding

Autocomplete and calltips

Scite provides two kinds of autocomplete feature, one that, after pressing Ctrl+Enter, shows a list of words (found in the current file) that start with the character(s) before the cursor, and one based on a file named "API file". Once you set one or more API files, the keybinding Ctrl+Enter work in the same way, while the keybinding Ctrl+I show a list of words found in the file API starting with the characters before the cursor. Moreover, after typed the "(" character the calltip appears, showing a help for the function; the calltip can be invoked by placing the cursor inside the characters "(" and ")" that follows a function call and pressing Ctrl+Shift+Space.

Syntax highlight

Scite provides a basic syntax highlight for C/C++ keywords using the "keywordclass.cpp" variable in cpp.properties file, and sets "keywords2.$(file.patterns.cpp)" for user-defined keywords, and "keywords3.$(file.patterns.cpp)" for Doxygen keywords; the visual styles are set by "style.cpp.16" for keywords2 and "style.cpp.17" for keywords3. The highlight for EFL keywords can be done adding a words list to "keywords4.$(file.patterns.cpp)", and setting up visual style by "style.cpp.19".

How to build API files and keywords list

In order to build your API file you need ctags and tags2api.py; you also need api2func.py if you want to generate a keywords list for syntax highlight. Here's the sequence to build a tag file for each E library:

Settings in SciTE.properties overrides those in SciTEDirectory.properties which overrrides those in .SciTEUser.properties which overrides those in SciTEGlobal.properties: you really have the full control of your editor! Using eet's source tree as example, you can have a "SciTE.properties" into libs/eet/src/lib that contains:

About keywords, you have to copy the content of eet_func.txt (build before) after "keywords4.$(file.patterns.cpp)=". In this way, you can use only Eet coding stuffs if you're editing a source file into libs/eet/src/lib. To change other settings like fonts, visual styles, or other non project-specific settings you can edit .SciTEUser.properties instead of SciTEGlobal.properties, to avoid to overwrite SciTEGlobal.properties if you upgrade your Scite installation.