### Syntax schemes for topic editor

Embedded topic editor supports customizable syntax highlighting schemes, customizable lists of items for code completion and customizable keystrokes for inserting the predefined phrases (code) into currently edited topic.

In this chapter you will learn how these schemes are defined and how you can create your own schemes.

Schemes location

Schemes are located under Extras\_Highlighters subfolder of Precision Helper.

For default installation on Windows 2000/XP it is a folder:
"C:\Documents and Settings\%UserName%\AppData\Precision\precisionhelper\Extras\_Highlighters"
For default installation on Windows Vista (and newer) it is a folder:
"C:\Users\%UserName%\AppData\Roaming\Precision\precisionhelper\Extras\_Highlighters"

Schemes syntax

Each scheme can be defined by one or more files of the following types:

- Scheme.keys.ini
- Scheme.html.ini
- Scheme.html.cih
- Scheme.xml.ini
- Scheme.xml.cih
- atd.

The files with .keys.ini suffix contain a definition of keystrokes and their corresponding phrases, that will be inserted into currently edited topic, or that will be applied onto currently selected text in the editor, after you press an appropriate hot-key.
Precision Helper supports a few specific macros, that can be used in this kind of files:
| (pipe - cursor location after the insertion)
# (sharp - inserts the end tag for currently edited element - this is a standalone macro)
\n (inserts the end of line - CRLF).

The files with .html.ini suffix contain a definition of syntax highlighting for the topics in html format.
The files with .xml.ini suffix contain a definition of syntax highlighting for the topics in xml format.

The files with .html.cih suffix contain a definition of code completion items for the topics in html format.
The files with .xml.cih suffix contain a definition of code completion items for the topics in xml format.

The internal syntax of each file mentioned above is relatively easy to understand and you can try to create your own schemes simply by copying some of the existing files.

Copyright 2008-2011 Precision software & consulting. All rights reserved.