Code Editor (Scintilla)

HarbourBuilder's code editor is powered by Scintilla 5.5+, the same editing component used by Notepad++, SciTE, and Code::Blocks. It provides professional code editing features with Harbour-aware syntax highlighting and intelligent code folding.

Same Engine Everywhere

All three platforms use Scintilla 5.5+ — Windows uses dynamic DLLs, macOS uses static libraries, and Linux uses shared libraries. The editing experience is identical across platforms.

Platform-Specific Scintilla Setup

PlatformLibrary TypeFiles
WindowsDynamic librariesScintilla.dll, Lexilla.dll
macOSStatic librarieslibscintilla.a, liblexilla.a
LinuxShared librarieslibscintilla.so, liblexilla.so

Syntax Highlighting

The editor uses a VS Code Dark+ color theme with Harbour-aware syntax highlighting:

Token TypeColorStyleExample
KeywordsBlueBoldfunction, return, local
CommandsTealNormalDEFINE FORM, BUTTON,
CommentsGreenItalic// This is a comment
StringsOrangeNormal"Hello World"
NumbersLight GreenNormal400, 3.14
PreprocessorMagentaNormal#include, #xcommand

Code Folding

Harbour-aware code folding understands xBase language structures:

Keyboard Shortcuts

ShortcutAction
Ctrl+F / Cmd+FOpen Find bar
Ctrl+H / Cmd+HOpen Replace bar
Ctrl+Space / Cmd+SpaceAuto-completion (150+ keywords)
Ctrl+/ / Cmd+/Toggle line comment
Ctrl+Shift+D / Cmd+Shift+DDuplicate current line
Ctrl+Shift+K / Cmd+Shift+KDelete current line
Ctrl+L / Cmd+LSelect current line
Ctrl+G / Cmd+GGo to line number
F12Go to definition (function/procedure/method/class)

Auto-Completion

Press Ctrl+Space / Cmd+Space to trigger auto-completion with 150+ items:

Bracket Matching

The editor automatically highlights matching brackets:

Bookmarks

Set bookmarks to quickly navigate to important code locations:

ShortcutAction
Ctrl+0..9 / Cmd+0..9Toggle bookmark at current line
Ctrl+Shift+0..9 / Cmd+Shift+0..9Jump to bookmark

Code Snippets

Tab expansion for common code patterns:

SnippetExpands To
fornfor nI := 1 to nCount
iffif condition
clsCLASS TClassName FROM TParentClass
funcfunction FunctionName()
procprocedure ProcedureName()
whildo while .T.
switswitch nValue
tryxbegin sequence ... end sequence

Auto-Indent

When you press Enter, the editor automatically indents the new line to match the previous line's indentation level. This keeps your code properly formatted without manual spacing.

Tabbed Multi-File Editing

The editor supports tabbed editing, allowing you to work on multiple source files simultaneously. Tabs show the filename and an asterisk (*) when the file has unsaved changes.

Build Messages Panel

After building, the Messages panel appears at the bottom showing:

Status Bar

The status bar at the bottom shows real-time editing information:

FieldDescription
LineCurrent line number
ColumnCurrent column position
INS/OVRInsert or Overwrite mode indicator
Line countTotal lines in the file
Char countTotal characters in the file
UTF-8File encoding
Harbour-Aware Editing

All Scintilla features are configured specifically for Harbour/xBase syntax. The lexer understands Harbour keywords, commands, and xBase-specific constructs.

On This Page

Getting Started Component Palette IDE Features Tutorials Reference Platforms Platform-Specific Scintilla Setup Syntax Highlighting Code Folding Keyboard Shortcuts Auto-Completion Bracket Matching Bookmarks Code Snippets Auto-Indent Tabbed Multi-File Editing Build Messages Panel Status Bar