menu bar

Keywords

When Pe performs the syntax-highlighting feature it scans the text for keywords, and if it finds any, it colours them according to the preferences you choose. To recognize keywords quickly, Pe uses tables that are built from keyword files. Since every language has its own set of keywords, there are keyword files for any supported language.

Languages tend to change over time and keywords will be added. Pe gives you the chance to alter the keyword set of any language. Pe can also recognize four user-defined keyword sets. (And I've already received a request for more.)

If you want to edit the keyword sets, you should open the keyword file belonging to the language whose keyword set you wish to alter. All the keyword files are located in ~/config/settings/pe/. The keyword files are structured text files, which can be edited with Pe.

Here is a (shortened) example of the C/C++ keyword file:

#define #else ... wchar_t while explicit
- User set 1:
BPoint BRect ....
- User set 2:
- User set 3:
- User set 4:

In this example you see that all the words that appear before the line "- User set 1" are the real keywords of the language. The keywords following the lines beginning with "- User set..." are user sets. Lines starting with a hyphen (-) are considered to be separators between sets of keywords.

Tip: When programming for BeOS, it is useful to enter all the classnames of Be classes in one user set. If you do this, you have a quick check for avoiding typos like BPopopMenu instead of BPopUpMenu.


Last updated: 05/17/98
Copyright 1997,1998, © Hekkelman Programmatuur,
info@hekkelman.com