Page MenuHomePhabricator

ECoding / Scite
Updated 3,440 Days AgoPublic

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


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

Here's a brief list of indentation setting:

#set the indentation level at 3 spaces
#strips trailing white spaces while saving 

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 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; you also need if you want to generate a keywords list for syntax highlight. Here's the sequence to build a tag file for each E library:

ctags -f imlib2.tags --excmd=number --c-types=pcdgstue /opt/e17/include/Imlib2.h
ctags -f eet.tags --excmd=number --c-types=pcdgstue /opt/e17/include/Eet.h
ctags -f evas.tags --excmd=number --c-types=pcdgstue /opt/e17/include/Evas*
ctags -f ecore.tags --excmd=number --c-types=pcdgstue /opt/e17/include/Ecore*
ctags -f edje.tags --excmd=number --c-types=pcdgstue /opt/e17/include/Edje*
ctags -f embryo.tags --excmd=number --c-types=pcdgstue /opt/e17/include/Embryo.h
ctags -f epsilon.tags --excmd=number --c-types=pcdgstue /opt/e17/include/Epsilon*
ctags -f ewl.tags --excmd=number --c-types=pcdgstue /opt/e17/include/ewl/*.h
ctags -f etk.tags --excmd=number --c-types=pcdgstue /opt/e17/include/Etk_Engine_Ecore_Evas* /opt/e17/include/etk/*.h
ctags -f emotion.tags --excmd=number --c-types=pcdgstue /opt/e17/include/Emotion.h
ctags -f engrave.tags --excmd=number --c-types=pcdgstue /opt/e17/include/engrave/*.h
ctags -f efreet.tags --excmd=number --c-types=pcdgstue /opt/e17/include/efreet/*.h

Here's an example to build a API file for ETK:

python etk.tags > etk.api

Having API files, you can copy them into a folder of your choice (to keep my system clean I chose a .scite/api folder tree on my homedir)

And here's an example to build a keyword list for highlight:

python etk.api > etk_func.txt

Now we are ready to configure Scite to use API and keywords. Scite provides four properties file used to change settings:

  1. present in the same directory as the file being edited;
  2. present in the same or in a parent directory as the file being edited (not enabled by default);
  3. ~/ present in your homedir;
  4. present in system-wide place (Ubuntu -> /usr/share/scite)

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

  1. Use Eet API file api.*.c=$(SciteUserHome)/.scite/api/eet.api
  2. Eet keywords keywords4.$(file.patterns.cpp)= eet_open eet_close < others here >

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 instead of, to avoid to overwrite if you upgrade your Scite installation.

EDC (Edje) source code


Imported from
1 barbieri 2010-11-10 12:06:36

Last Author
Last Edited
Sep 4 2013, 5:11 AM