About

fte
Version 0.37b
(c) Copyright 1995 Marko Macek

fte is an OS/2 text mode editor, with a lot of features:

The latest version can be always downloaded from:
http://ixtas.fer.uni-lj.si/~markom/fte

Please send comments/suggestions/bug reports to:
Marko.Macek@snet.fer.uni-lj.si
or
mark@hermes.si


Configuration

This section covers installation and configuration of editor.


Installation

The following files are included in the archive:

README
Release notes, read first
fte.exe
Main executable
fte.cfg
Main configuration file
fte.inf
This file.
config\*.fte
Configuration files
clipserv.exe
Clipboard server (required for PM clipboard support).
cliputil.exe
Utility to copy/paste to/from clipboard from command line.
file_id.diz
Program description for BBS upload.

To install, copy FTE.EXE, CLIPSERV.EXE, CLIPUTIL.EXE, FTE.CFG, FTE.INF into one directory and and *.FTE files into the other. Then change FTE.CFG to point to the MAIN.FTE file. Then, make sure that PATH environment variable points to the directory containing the executable. fte.exe


Command line options

The command syntax is:

fte [[options] [files] ...]

Options:

-!
Ignore any external configuration file.
-c<file>
Use specified configuration file.
-#<line>[,<column>]
Go to line (and column) in next file on command line
-m<MODE>
Set mode for next files to <MODE>
-m
Reset to default mode
--
The rest of the arguments are not options
-+
The next argument is not an option even if starting with a '-'.

Examples:

fte -mBIN fte.exe
load fte.exe in BIN mode
fte -#100,30 win.c
go to (100,30) in win.c
fte window.cpp
load file window.cpp
fte -mBIN fte.exe -m fte.cpp
load fte.exe in binary mode, window.cpp in default mode (C/C++)
fte -mBIN -+ -bla-
load file -bla- in BIN mode
fte -- -1 -2 -3 -4 -5 -6
.load files -1, -2, -3, -4, -5, -6

Configuration file

If the command line option -! is used, editor will not attemp to load a configuration file and will use default settings built into the editor executable.

All configuration is done in fte.cfg. file which must reside in the same directory as the fte.Exe executable. Most of the settings in configuration file are CASE SENSITIVE. '#'. is used to start a comment to the end of line.


Global Settings

The following settings can be used in the GLOBAL section of the configuration file.
ScreenSizeX
Number of columns visible on screen or window
ScreenSizeY
Number of lines visible on screen or window
CursorInsertStart
Starting percentage of cursor size (from top) when in insert mode.
CursorInsertEnd
Ending percentage of cursor size when in insert mode.
CursorOverStart
Starting percentage of cursor size when in overstrike mode
CursorOverEnd
Ending percentage of cursor size when in overstrike mode.
SysClipboard
When set to 1, editor will use external (PM) clipboard instead of internal one.
SelectPathname
If set to 1, pathname will be selected by default when prompting for a file.
LoadAfterQuit
If set to 1, editor will prompt for another file when all are closed.
ShowMenuBar
If set to 1, main menu bar will be visible by default.
ShowScrollBar
If set to 1, scroll bar will be visible by default.
ScrollBarWidth
Scroll bar width in characters
DefaultModeName
Default mode name for loading files. If not set or invalid, first mode in the configuration file will be used instead.
CompletionFilter
Files matching this regexp are ignored when doing filename completion.
WSStyleSearch
If set to 1, editor will use WordStar style prompts with separate prompts for search, replace string and options instead of the default search/replace/options style.
CompileRx
Defines regexp and subpatterns to match when searching for errors/warnings in compilation output. First number is a number of the subpattern that matches filename. The second must match the line number, the third parameter is the regular expression to match to each line of the compiler output.
C_*
Define the C mode smart indentation parameters
REXX_Indent
Defines the REXX basic indentation level

Editing Modes

fte allows each file extension to have a different editing mode. Mode is a collection of editor settings such as keybindings, tab settings, autoindent settings, syntax highlighting,...

Syntax of mode command is

mode NAME { mode settings }
mode NAME: PARENT { mode settings }
mode NAME: PARENT, "filename regexp" { mode settings }
mode NAME: PARENT, "filename regexp", "first line regexp" { mode settings }

Mode with name NAMEinherits settings from mode PARENT if parent mode is specified at mode declaration.

When editor is searching for a mode to use for a file it will first check if the mode has been overriden by a FileLoadInMode command or a command line option (-m).

Then it will check if the file name matches any of the "filename regexps" listed with mode declarations.

If the mode has still not been found, it will read the first line (max 80 chars) of the file, and attempt to match the "first line regexp" with the first line.

If this fails, editor will use mode specified by DefaultModeName setting to load a file. If that mode does not exist, first mode defined in the configuration file will be used.


Mode Settings

The following settings can be specified for each mode:

ExpandTabs {0,1}
Should be set to 1 if tabs are to be expanded when displayed.
TabSize {1-32}
Tab size when tabs are shown expanded on display.
AutoIndent {0,1}
Should be set to 1 if autoindent is to be used.
Insert {0,1}
If set to 1, Insert mode is active by default. If set to 0, Overwrite mode is activated.
StripChar {ASCII code}
This characted will be stripped if at the end of line when the file is being loaded. If it is set to -1, no characted will be stripped.
LineChar {ASCII code}
This character is used as a line separator when loading a file. If set to -1, there is no line separator. (WARNING: File will be loaded as one line if LineChar is set to -1).
AddCR {0,1}
If set to 1, CR (13, \r) character will be added to end of line when saving.
AddLF {0,1}
If set to 1, LF (10, \n) characted will be added to end if line when saving.
ForceNewLine {0,1}
Normally, when saving, the last line is saved without any CR/LF characters. This setting will override that behaviour.
Hilit {0,1}
If set to 1, syntax highliting will be active
ShowTab {0,1}
If set to 1, tabs will be visible as circles (EPM-like).
IndentMode {PLAIN,C,REXX}
Activates the specified smart indent mode. (PLAIN is not really smart :))
HilitMode {PLAIN,C,HTML,MAKE,REXX,DIFF,IPF,PERL,MERGE,Ada}
Activates the specified coloring mode. PLAIN specifies no coloring.
UndoLimit {Number}
Limit undo to this many recent commands (-1 = unlimited)
KeepBackups {0,1}
If set to 0, backup files will be deleted after a successful save operation.
MatchCase {0,1}
If set to 0, searches will be case insensitive. This can be toggled via ToggleMatchCase(C-O_C-C) command when editor is running.
BackSpKillTab {0,1}
If set to 1, BackSpace will kill entire tabs instead of converting them to spaces.
DeleteKillTab {0,1}
If set to 1, Delete will kill entire tabs instead of converting them to spaces.
BackSpUnindents {0,1}
If set to 1, BackSpace will inindent to previous indentation level if issued on beginning of line.
SpaceTabs {0,1}
If set to 1, InsertTab command will insert spaces instead of tabs.
IndentWithTabs {0,1}
If set to 1, indentation will be done using tabs instead of spaces.
WordWrap {0,1,2}
If set to 1, editor wrap current line when right margin is reached. If set to 2, editor will wrap current paragraph continously.
LeftMargin {1-xx}
Left margin for word wrap.
RightMargin {1-xx}
Right margin for word wrap.
Trim {0,1}
If set to 1, spaces on the end of line will be trimmed when editing.
ShowMarkers {0,1}
If set to 1, end of line and end of file markers will be shown.
CursorTroughTabs {0,1}
If set to 1, editor will allow cursor position inside tabs.
DefFindOpt 'options'
Default search options for Find command.
DefFindReplaceOpt 'options'
Default search/replace options for FindReplace command.
MainMenu "menu"
Main menu displayed when editing in this mode.
LocalMenu "menu"
Local menu used when editing in this mode.
SaveFolds {0,1,2}
If 0, folds are not saved. If 1, folds are saved at BOL, if 2 folds are saved at EOL.
CommentStart "comment-start-string"
String that starts comments (for saving folds)
CommentEnd "comment-ent-string"
String that ends comments

Loading files in various formats

Here are settings for loading files in various formats:

DOS/Win/OS2/NT text files (CR/LF delimited):
          StripChar      13
          LineChar       10
          AddCR          1
          AddLF          1

UNIX text files (LF delimited):
          StripChar      -1
          LineChar       10
          AddCR          0
          AddLF          1
MAC text files (CR delimited):
          StripChar      -1
          LineChar       13
          AddCR          1
          AddLF          0
Binary files (fixed record length):
          StripChar      -1
          LineChar       -1
          AddCR          0
          AddLF          0
          LoadMargin     64
          ForceNewLine   0

Mode Keyboard Mappings

Keybindings are inherited from parent modes unless overriden.

Here are some examples of key specifiactions:

[A]
Uppercase a
[a]
Lowercase a
[;]
Semicolon
[A+A]
Alt+A
[C+B]
Ctrl+B
[A+C+F1]
Alt+Ctrl+F1
[A+C+S+F1]
Alt+Ctrl+Shift+F1
[A+Space]
Alt+Space
[C+K_C+B]
Ctrl+K and then Ctrl+B (two keys)
[C+A_C+B_C+C]
Ctrl+A Ctrl+B Ctrl+C must be pressed in sequence.
[G+-]
Gray -
[G++]
Gray +
[C-S-X]
X, ignore the state of Ctrl and Shift keys.
[C+\\]
Ctrl+Backslash
[C+\[]
Ctrl+[
[C+G-Left]
Ctrl+Left, no difference between two Left keys.
[C+A-A]
Ctrl+A, ignore the state of Alt key.

The following special keys are available (case sensitive):

F1-F12 Home End PgUp PgDn Insert Delete Up Down Left Right Enter Esc BackSp Space Tab Center

Keyname can be preceeded by modifiers (A, C, G, S). If modifier is followed by a + (plus), the modifier key must be pressed to match the key specification. If the modifier key is followed by - (minus), the state of the modifier key is ignored.

Multiple-key combinations can be specified by separating them with _ (underline)

Keys are bound using the key command:

key [keyspec] { editor commands }

ASCII characters >= 32 are bound to SelfInsert by default.

See fte.Cfg for examples and default configuration.


Colors

Colors are configured in COLOR.FTE file.

Syntax for color settings is:

color { { 'name', 'value' } ... }

Value is the PC character attribute first char is background color, the second is foreground color.

Colors are as follows:

        0        Black
        1        Dark Blue
        2        Dark Green 
        3        Dark Cyan
        4        Dark Red
        5        Dark Magenta
        6        Orange
        7        Pale Gray
        8        Dark Gray
        9        Blue
        A        Green
        B        Cyan
        C        Red
        D        Magenta
        E        Yellow
        F        White

Status Line

Status line displays the following status information:

position|flags|mode|curchar|mod? filename|winno

position = line:column

flags

I
Insert
A
Autoindent
C
Matches are case sensitive
SLC
Stream, Line, Column block-mode
wW
Automatic word wrap active (w = line, W = paragraph).

mode = Mode name as specified in configuration file

curchar = Decimal ASCII code of character under cursor, or EOL/EOF

mod? = * if file was modified, % if file is read-only


Editor Commands

These commands can be bound to keys in configuration file:


Cursor Movement

MoveLeft
Move cursor left one character
MoveRight
Move cursor right one character
MoveUp
Move cursor up one line
MoveDown
Move cursor down one line
MovePrev
Move cursor to previous character
MoveNext
Move cursor to next character
MoveWordLeft
Move cursor one word left
MoveWordRight
Move cursor one word right
MoveWordPrev
Move cursor to start of previous word
MoveWordNext
Move cursor to start of next word
MoveLineStart
Move cursor to beginning of line
MoveLineEnd
Move cursor to end of line
MovePageUp
Move cursor to previous page
MovePageDown
Move cursor to next page
MovePageLeft
Move cursor one page left
MovePageRight
Move cursor one page right
MovePageStart
Move cursor to top of page
MovePageEnd
Move cursor top bottom of page
MoveFileStart
Move cursor to start of buffer
MoveFileEnd
Move cursor to end of buffer
MoveBlockStart
Move cursor to beginning of block
MoveBlockEnd
Move cursor to end of block
ScrollLeft
Scroll screen left 8 characters
ScrollRight
Scroll screen right 8 characters
ScrollDown
Scroll screen down 1 line
ScrollUp
Scroll screen up 1 line
MoveFirstNonWhite
Move to first non whitespace character on line
MoveLastNonWhite
Move after last non whitespace character on line
MovePrevEqualIndent
Move to previous line with indentation equal to current.
MoveNextEqualIndent
Move to next line with indentation equal to current.
MovePrevTab
Move cursor to previous tab stop.
MoveNextTab
Move cursor to next tab stop.
MovePrevPos
Move to previous position
SavePos
Save current position
MoveSavedPos
Restore saved position
MoveSavedPosCol
Restore saved position column
MoveSavedPosRow
Restore saved position row
MoveLineTop
Move current line to top of window
MoveLineCenter
Move current line to center of window
MoveLineBottom
Move current line to bottom of window

Text deleting

KillLine
Delete current line
KillChar
Delete character under cursor
KillCharPrev
Delete character before cursor
KillWord
Delete next word
KillWordPrev
Delete previous word
KillToLineStart
Delete text to line start
KillToLineEnd
Delete text to line end
KillBlock
Kill text in block
BackSpace
Delete character before cursor (configurable)
Delete
Delete character under cursor (configurable)

Line commands

LineInsert
Insert empty line before current line
LineAdd
Add line after current
LineSplit
Split line at current cursor position
LineJoin
Join line with next one
LineNew
Add new line after current one, move to next line and autoindent
LineIndent
Reindent current line
LineTrim
Trim spaces at the end of current line

Text insertion

InsertTab
Insert Tab character
SelfInsert
Insert character defined by last key
WrapPara
Word wrap paragraph (to next blank line).
LineDuplicate
Duplicate current line.
InsPrevLineChar
Insert character above current character.
InsPrevLineToEol
Insert previous line from current char to eol.
CompleteWord
Complete word to previous word starting with text before cursor.

Blocks

BlockBegin
Set block beginning to current position
BlockEnd
Set block end to current position
BlockUnmark
Unmark selected block
BlockCut
Cut selected block to clipboard
BlockCopy
Copy selected block to clipboard
BlockPaste
Paste clipboard to current position
BlockPasteStream
Paste clipboard to current position as stream block.
BlockPasteLine
Paste clipboard to current position as line block.
BlockPasteColumn
Paste clipboard to current position as column block.
BlockKill
Delete selected text
BlockIndent
Indent block by 1 character
BlockUnindent
Unindent block by 1 character
BlockMarkStream
Begin/end marking stream block
BlockMarkLine
Begin/end marking line block
BlockMarkColumn
Begin/end marking column block
BlockExtendBegin
Begin extending selected block
BlockExtendEnd
End extending selected block
BlockReIndent
Reindent entire block (C/REXX mode)
BlockRead
Read block from file
BlockWrite
Write marked block to file

File commands

FileSave
Save current file
FileSaveAll
Save all loaded files
FileSaveAs
Save current file under a new name, changing the name of loaded file
FileWriteTo
Save current file under a new name, without changing name of loaded file
FileQuit
Close current file
FileQuitAll
Close all files
FileLoad
Load a file
FileLoadInMode
Load a file in a specified mode.
FileReload
Reload current file
FileNext
Select next file in buffer ring
FilePrev
Select previous file in buffer ring

Window commands

WinHSplit
Split window horizontally
WinNext
Activate next window
WinPrev
Activate previous window
WinZoom
Make current window the only one (close all others)
WinRefresh
Repaint entire screen.
WinResize
Resize window (takes integer argument, -x = smaller, +x = bigger)
WinClose
Close current window.

Undo/Redo

Undo
Undo last operation
Redo
Redo last undone operation

Case conversion

CharCaseUp
Convert current character to uppercase
CharCaseDown
Convert current character to lowercase
CharCaseToggle
Toggle case of current characters
LineCaseUp
Convert characters on current line to uppercase
LineCaseDown
Convert characters on current line to lowercase
LineCaseToggle
Toggle case of characters on current line
BlockCaseUp
Convert characters in selected block to uppercase
BlockCaseDown
Convert characters in selected block to lowercase
BlockCaseToggle
Toggle case of characters in selected block

Searching

Find
Search for text, w/options
FindReplace
Search and replace text w/options.
FindRepeat
Repeat last search/replace operation
FindRepeatReverse
Repeat last search/replace operation in opposite direction
FindRepeatOnce
Repeat last search/replace operation only once.
MatchBracket
Search for matching bracket
IncrementalSearch
Search incrementally for text.
Search
Search for text
SearchB
Search for text backwards
SearchRx
Search for regexp
SearchReplaceRx
Search and replace using regexp
SearchAgain
Search for text again
SearchAgainB
Search for text again backwards
SearchReplace
Search for text and replace
SearchReplaceB
Search and replace backwards

Folding

FoldCreate
Create fold
FoldCreateByRegexp
Create folds at lines matching regexp
FoldDestroy
Destroy fold at current line
FoldDestroyAll
Destroy all folds in file
FoldOpen
Open fold at current line
FoldOpenAll
Open all folds in file
FoldOpenNested
Open current fold and all nested folds
FoldClose
Close current fold
FoldCloseAll
Close all folds in file
FoldToggleOpenClose
Toggle open/close fold.
FoldPromote
Make fold a higher level fold
FoldDemote
Make fold a lower level fold

Compile commands

Compile
Run compile command in background
CompileViewErrors
View compiler output
CompilePrevError
Jump to previous compiler error
CompileNextError
Jump to next compiler error

Settings

ToggleAutoIndent
Toggle automatic indentation
ToggleInsert
Toggle insert/overwrite mode
ToggleExpandTabs
Toggle tab expansion on display
ToggleShowTabs
Toggle tab visibility (as circles).
ToggleUndo
Toggle undo/redo information saving.
ToggleReadOnly
Toggle read only file.
ToggleKeepBackups
Toggle backup files.
ToggleMatchCase
Toggle case sensitivity for searches
ToggleBackSpKillTab
Enable/disable BackSp killing entire tabs.
ToggleDeleteKillTab
Enable/disable Delete killing entire tabs.
ToggleSpaceTabs
Toggle insertion of spaces instead of tabs on Tab key.
ToggleIndentWithTabs
Toggle indentation with tabs.
ToggleBackSpUnindents
Toggle unindentation on previous indent level on BackSp.
ToggleWordWrap
Toggle automatic word wrap.
ToggleTrim
Toggle trimming of spaces at end of line.
ToggleShowMarkers
Toggle EOL/EOF marker visibility.
ToggleSysClipboard
Toggle usage of system clipboard.
SetLeftMargin
Set left margin to current cursor column.
SetRightMargin
Set right margin to current cursor column.
ChangeTabSize
Prompt for tab size.
ChangeCIndent
Prompt for indentation level for CMode smart indentation.
ChangeCBraceOfs
Change brace offset for CMode smart indentation.
ChangeREXXIndent
Prompt for indentation level for REXX smart indentation
ChangeLeftMargin
Prompt for left margin for word wrap.
ChangeRightMargin
Prompt for right margin for word wrap.

Other

ExitEditor
Close all files and exit editor
RunCommand
Run command in foreground.
ViewBuffers
View buffer list
ViewModeMap
View keyboard mappings for current mode
ChangeMode
Activate another mode
GetPMClip
Copy PM clipboard to editor clipboard
PutPMClip
Copy editor clipboard to PM clipboard
ShowEntryScreen
Show saved shell screen.
SwitchTo
Switch to buffer with a number.
ChangeKeys
Change current keymap to keymap of another mode.
ChangeFlags
Change current flags to flags of another mode.
ShowMenu
Show and select from menu.
MainMenu
Activate menu bar.
LocalMenu
Activate local popup menu.
ASCIITable
Show a popup ASCII table.
PlaceBookmark
Place a named bookmark at current buffer position
GotoBookmark
Goto a named bookmark in current buffer
RemoveBookmark
Remove a named bookmark from current buffer

Regular Expressions

Regular expressions are a way to specify text patterns when searching for a text in a buffer. Regular expressions consist of normal characters and special operator characters with a special meanings. Operators allow you to anchor matches, match classes of characters, match given pattern several times or match alternate patterns. Operators can be also used to group patterns.

Search Operators

\
Quotes next character. Character will lose it's special meaning. Can also be used to match special characters.
\n
Matches a 0x0A (LF) character.
\r
Matches a 0x0D (CR) character.
\t
Matches a 0x09 (TAB) character.
\e
Matches an escape character (0x1B)
\s
Matches whitespace (CR, LF, TAB, SPACE) characters.
\S
Matches non-whitespace (the reverse of \s)
\w
Matches word character [a-zA-Z0-9]
\W
Matches non-word character
\d
Matches a digit [0-9].
\D
Matches a non-digit.
\U
Matches uppercase characters (A-Z)
\L
Matches lowercase characters (a-z)
\x##
Matches specified hex value (\x0A, \x0D, \x09, etc.)
\o###
Matches specified octal value (\o000, \o015, etc.)
\N###
Matches specified decimal value (\N000, \N013, \N009, etc.)
\C
Starts case sensitive matching.
\c
Starts case insensitive matching.
^
Match a beginning of line.
$
Match an end of line.
.
Match any character.
<
Match beginning of word (word consists of [A-Za-z0-9]).
>
Match end of word.
[ ]
Specifies a class of characters ([abc123], [\]\x10], etc).
[ - ]
Specified a range of characters ([0-9a-zA-Z_], [0-9], etc)
[^ ]
Specifies complement class ([^a-z], [^\-], etc)
?
Matches preceeding pattern optionally (a?bc, filename\.?, $?, etc)
|
Matches preceeding or next pattern (a|b, c|d, abc|d). Only one character will be used as pattern unless grouped together using {} or ().
*
Match zero or more occurances of preceeding pattern. Matching is greedy and will match as much as possible.
+
Match one or more occurances of preceeding pattern. Match is greedy.
@
Match zero or more occurances of preceeding pattern. Matching is non-greedy and will match as little as possible without causing the rest of the pattern match to fail.
#
Match one or more occurances of preceeding pattern. Matching is non-greedy.
{ }
Group patterns together to form complex pattern. ( {abc}, {abc}|{cde}, {abc}?, {word}?)
( )
Group patterns together to form complex pattern. Also used to remember the matched substring which can be used for substitution operation. Up to 9 can be used.

Replace Operators:

\
Causes the next character to lose it's special meaning.
\n
Inserts a 0x0A (LF) character.
\r
Inserts a 0x0D (CR) character.
\t
Inserts a 0x09 (TAB) character.
\#
Recalls stored substring from matched pattern ()'s. (\1, \2, \3, to \9)
\0
Recalls entire matched pattern.
\u
Convert next character to uppercase
\l
Convert next character to lowercase
\U
Convert to uppercase till \E or \e
\L
Convert to lowercase till \E or \e

Search and Replace

Search and Replace Commands:

Find
Search for text w/options.
FindReplace
Search and replace text w/options.
FindRepeat
Repeat last search/replace operation
FindRepeatReverse
Repeat last search/replace operation in opposite direction
FindRepeatOnce
Repeat last search/replace operation only once.
MatchBracket
Search for matching bracket
IncrementalSearch
Search incrementally for text.
Search
Search for text
SearchB
Search for text backwards
SearchRx
Search for regexp
SearchReplaceRx
Search and replace using regexp
SearchAgain
Search for text again
SearchAgainB
Search for text again backwards
SearchReplace
Search for text and replace
SearchReplaceB
Search and replace backwards

If WSStyleSearch is set to 1, search/replace string and options are entered at separate prompts. Otherwise they must be separated by a '/' (slash) and any slash or backslash in search/replace string must be escaped by '\' (backslash), except when using regular expressions (double escaping is not necessary).

For example (when WSStyleSearch is off):

         foo/bar/agn    replace all foo with bar globally without prompting
Search and Replace Options

a
Search for all occurances
b
Search in block only
g
Search through entire file/block (globally).
i
Ignore case
r
Reverse search
x
Use regular expression matching
d
Delete found line
j
Join found line
n
No prompting

Commands affected by DefFindOpt mode setting:

Commands affected by DefFindReplaceOpt mode setting:

Commands affected by MatchCase mode setting:

Commands affected by WSStyleSearch mode setting:


CMode Smart Indentation

Settings for CMode smart indentation

C_Indent
Basic C indentation level
C_BraceOfs
Brace '{' offset
C_CaseOfs
Offset of case and default statements
C_CaseDelta
Offsets of statements following case/default.
C_ClassOfs
Offset of public, private and protected
C_ClassDelta
Offset of statements following public, private, protected
C_ColonOfs
Offset of labels
C_CommentOfs
Offset of comments
C_CommentDelta
Offset of second line of comments

Example 1:

class line {
public:                   // C_ClassOfs = 0
    line();               // C_ClassDelta = 4
    ~line();
};

int main() {
    int x = 1;
    
    /*                    // C_CommentOfs = 0
     * check value        // C_CommentDelta = 1
     */
    
    puts("main");         // C_Indent = 4
    if (x)
    {                     // C_BraceOfs = 0
        switch (x) {
        case 1:           // C_CaseOfs = 0
            puts("ok");   // C_CaseDelta = 4
            break;
        }
    }
end:
    return 0;
}

Example 2:

class line {
  public:                     // C_ClassOfs = 2
    line();                   // C_ClassDelta = 2
    ~line();
};

int main() {
    int x = 1;
    
      /*                      // C_CommentOfs = 2
      ** check value          // C_CommentDelta = 0
      */
    
    puts("main");             // C_Indent = 4
    if (x)
    {                         // C_BraceOfs = 0
        switch (x) {
            case 1:           // C_CaseOfs = 4
                puts("ok");   // C_CaseDelta = 4
                break;
        }
    }
end:
    return 0;
}

Performance Tips

If you want to achieve top performance (necessary for some text editing tasks), here are some tips:

History of Changes


Things To Do

Short term:
Future:
Comments and suggestions are appreciated.