| Home | Libraries | People | FAQ | More

## Editor Support

Editing quickbook files is usually done with text editors both simple and powerful. The following sections list the settings for some editors which can help make editing quickbook files a bit easier.

| Note
You may submit your settings, tips, and suggestions to the authors, or through the docs Boost Docs mailing list.

### Scintilla Text Editor

> Section contributed by Dean Michael Berris

The Scintilla Text Editor (SciTE) is a free source code editor for Win32 and X. It uses the SCIntilla source code editing component.

| Tip
SciTE can be downloaded from http://www.scintilla.org/SciTE.html

You can use the following settings to highlight quickbook tags when editing quickbook files.

    qbk=*.qbk
    lexer.*.qbk=props
    use.tabs.$(qbk)=0
    tab.size.$(qbk)=4
    indent.size.$(qbk)=4
    style.props.32=$(font.base)
    comment.stream.start.props=[/
    comment.stream.end.props=]
    comment.box.start.props=[/
    comment.box.middle.props=
    comment.box.end.props=]

| Note
Thanks to Rene Rivera for the above SciTE settings.

### KDE Support

#### boost::hs::quickbook

boost::hs::quickbook is a syntax highlighting designed to work with Katepart. It can be used in KWrite, Kate, Konqueror and KDevelop, and supports all the constructs of Quickbook 1.4 including tables, list, templates and macros.

.qbk loaded in a text editor

.qbk loaded with boost::hs support

html generated from this .qbk file

Table 37.7. Code examples

Name | Code | Description
--- | --- | ---
for loop | `for(int k=0; k<10; k++) v+=k;` | Sums some numbers.
while loop | `{ int k; while( k < 10 ) { v+=k; k++ } }` | Same effect.
infinite loop | `while( true ) { v+=1; }` | Not a good example.

#### Code Folding

boost::hs goes far beyond simple coloring. One useful thing you can get the editor to do is to mark regions. They appear in a small grey line and each region can be folded or unfolded independently.

#### Auto Comment / Uncomment

Another important feature is the possibility to auto-comment or uncomment some piece of code (Tools - Comment). Commented regions can be uncommented simple calling the uncomment command while being in it.

#### Styles reference

Name | Style | Description
--- | --- | ---
plain text | normal black | Plain text at each level.
formatted text | formatted black | Bold, italic, underline and mixes. Teletype, replaceable, strikeout.
structure | light blue | All quickbook structures characters ([, ], [block-type, simple formating boundaries, lists keywords (*, #)
macros | red | Names in macro definitions, macros insertion if it is used the __xxx__ proposed sintaxis.
templates | red | Names in template definitions
anchors | red | All the keywords that are used to link quickbooks together.
comments | italic light gray | Inside the commentaries.
tables | HTML like | Reveal the structure, bold title, higlighted HTML like columns titles.
variable lists | HTML like | Reveal the structure, bold title, bold HTML like items names.
c++ code | cpp Kate syntax | Code blocks and inline code.
paths | green | Image, files and web paths
IDE specific | dark blue | IDE commands

#### About boost::hs

boost::hs::quickbook is a component of boost::hs, a syntax highlighting for C++, doxygen, Boost.Build jamfiles and QuickBook. boost::hs has his own page here.

| Note
boost::hs::cpp support QuickBook code import comments style!

#### Installing boost::hs

There exist an ongoing effort to push boost::hs upstream to the KatePart project. In a few months KDE may have native Quickbook support! For the moment you must download and install it.

You can download boost::hs from here.

| Note
A copy of boost::hs::quickbook and boost::hs::cpp is available in `boost/tools/quickbook/extra/katepart`.

In order to install it you must copy the content in the folder katepart/syntax/ to the appropriate katepart syntax folder in your machine. In general this folder will be in /usr/share/apps/katepart/syntax. A bash script named install.sh is included that copy the files to this folder.