About
fte
Version 0.32b
(c) Copyright 1995 Marko Macek
fte is an OS/2 text mode editor, with a lot of features:
- Powerful Color Syntax Highlighting for:
- C/C++
- REXX
- HTML
- IPF
- Perl
- Ada
- Pascal
- Java
- and various other files...
- Smart Indentation for C/C++ and REXX
- Multiple files/windows
- File limited only by virtual memory
- Configurable keyboard/menus/colors
- Undo/Redo of any number of commands
- Stream/Line/Column blocks
- Ability to edit binary files
- Regular expression search and replace
- Background compilation and compiler error parsing support
- Mouse support
- Automatic word wrap.
- Incremental search.
- Folding
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 (REQUIRED)
- 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 manage 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-\\]
- Ctrl+Backslash
- [C-\[]
- Ctrl+[
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
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 modename [curchar] mod? filename
position = visible_line, actual_line: column, character_number
flags
- I
- Insert
- A
- Autoindent
- T
- Tabs Expanded (only on display, not file)
- C
- Matches are case sensitive
- wW
- Automatic word wrap active (w = line, W = paragraph).
- U
- Undo/Redo active
- E
- Trim active (spaces at EOL trimmed)
- SLC
- Stream, Line, Column block-mode
- X
- AutoExtend block-mode
mode = Mode name as specified in configuration file
curchar = Dec,Hex ASCII code of current character
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
- 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.
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:
- IncrementalSearch
- Search
- SearchB
- SearchRx
- SearchReplaceRx
- SearchReplace
- SearchReplaceB
Commands affected by WSStyleSearch mode setting:
- Find
- FindReplace
- FindRepeat
- FindRepeatReverse
- FindRepeatOnce
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:
- Disable Tab Expansion
- Disable ShowMarkers
- Disable Undo
- Use PLAIN hilit mode
History of Changes
- 0.34
- 1995/10/15
- Minor fixes & docs updates...
- 0.33
- 1995/10/01
- SIGBREAK handler now works again.
- Fixes in C/C++ smart indentation (if in switch, ...)
- Pascal highlighting mode.
- Printing.
- Rewritten folding. Now supports nested folds, opening closing folds, and persistent folds.
- New folding commands: FoldCreate, FoldDestroy, FoldOpen, FoldClose, FoldPromote, FoldDemote, FoldCreateByRegexp, FoldOpenAll, FoldOpenNested, FoldCloseAll, FoldDestroyAll, FoldToggleOpenClose, MoveFoldPrev, MoveFoldNext.
- New settings: SaveFolds, CommentStart, CommentEnd.
- Word characters can be configured using WordChars setting.
- 0.32
- 1995/08/15
- New search routines. (Find, FindReplace, FindRepeat, FindRepeatReverse, FindRepeatOnce, ...)
- Block-local searches.
- In buffer-list, most recently used files will now be listed first.
- Main menu bar can now be hidden.
- Performance improvements.
- Bookmarks! New commands: PlaceBookmark, GotoBookmark, RemoveBookmark
- Files can now be saved and closed from window list.
- Optimized CMode indentation. Also more configurable.
- 0.31
- 1995/07/31
- Bug fixed in undo/redo when UndoLimit reached.
- 0.30
- 1995/07/30
- Folding support.
- New commands: FoldLine, UnfoldLine, UnfoldNextLine, UnfoldAll, ClearFolds, FoldIndent, FoldRegexp, FoldBlock, UnfoldBlock, FoldBlockRegexp
- BackSpace at eof when TrimLine is enabled will not abort.
- Incremental search (IncrementalSearch).
- PgUp/PgDn on a file prompt will show a list of files.
- New command: CompleteWord
- 0.29
- 1995/07/20
- Regexps can now be case insensitive (\C,\c).
- BlockRead/BlockReadColumn/BlockWrite commands.
- Block marking can now be undone.
- Commands that prompt for string/int values can now take string/int arguments.
- Multiple compile-regex statements can be specified simultaneously
- Minor bug-fixes in regexps ([\x00-\xFF] now works).
- Filter for filename completion.
- New commands: SwitchTo ChangeKeys ChangeFlags ShowMenu
- New options: CompletionFilter DefaultModeName
- 0.28
- 1995/07/08
- - Needs to have documentation updated.
- Mostly rewritten PERL highlighting. Works much better now.
- Completely new config file syntax.
- New commands: ASCIITable, LoadFileInMode
- CMode indentation should now work for Perl (close enough).
- Highlighting for ADA and Email messages.
- 0.27
- 0.26
- 1995/06/18
- New commands: {Char,Line,Block}Case{Up,Down,Toggle}
- New setting: LoadAfterQuit -- if set to 1, editor will prompt to load another file before exiting.
- New setting: ShowScrollBar {0,1}.
- 0.25
- 1995/06/12
- Minor bug fix in REXX highlighting ("\"", ...)
- Bug fixes in word wrap.
- BlockCut now doesn't move the cursor to the block beginning.
- New commands: MoveLineTop, MoveLineCenter, MoveLineBottom.
- Editor will now check if the file has changed before the first modification.
- Found text is now highlighted.
- New CMode setting: C.BraceOfs and command: ChangeCBraceOfs
- New commands: MovePrevPos, SavePos, MoveSavedPos, MoveSavedPosCol, MoveSavedPosRow
- 0.24
- 1995/06/06
- When checking for file modification time of last change is now used instead of the time of last access.
- Wildcard support for file loading.
- 0.23
- 1995/06/04
- Ctrl+C and Ctrl+Break are now disabled.
- Ctrl+S and Ctrl+C keys are now again recognised in Windowed mode.
- Fixed problem when spawning a subprocess in Windowed mode.
- New command: ShowEntryScreen
- ListRoutines in CMode only shows functions not their prototypes.
- New setting: SysClipboard - if set to 1, editor will automatically use system clipboard.
- New command: ToggleSysClipboard.
- Minor bug fix in PM clipboard support.
- New commands: BlockPasteStream, BlockPasteColumn and BlockPasteLine. BlockPaste command will now always paste in current block mode, not in the last Copy/Cut mode.
- More than 4 commands can be bound to a key (actually this worked since 0.18, but was not documented).
- New command: FileReload.
- Editor will now check if file has changed on disk before saving it.
- 0.22
- 1995/05/28
- But fix in regular expressions (nested +#*@).
- Changes in regular expression syntax.
- New function: ListRoutines. Shows functions in current buffer.
- New setting: RoutineRx
- 0.21
- 1995/05/21
- REXX mode smart indentation.
- KillWord & KillWordPrev commands now actually work.
- Pressing Ctrl+Enter to begin Search will toggle case sensitivity of search.
- New option 'Trim' and commands 'ToggleTrim', 'LineTrim'. Removes whitespace from end of lines.
- New option 'ShowMarkers' and command 'ToggleShowMarkers'. Shows end of line and end of file markers.
- Bug fix in PERL highlighting (caused lockups)
- Bug fixes and improvements in regular expressions.
- 0.20
- 1995/05/18
- Major bug fixes in word wrap.
- New commands: MovePrevTab, MoveNextTab.
- Bug fixes in BlockIndent and BlockUnindent (stream/line mode)
- 0.19
- 1995/05/16
- Function names in REXX are now highlighted.
- WordWrap can be set to 0 - disabled, 1 - wrap line at right margin and 2 - wrap paragraph continously. Function ToggleAutoWrap renamed to ToggleWordWrap.
- New way to set left/right margin (SetLeftMargin, SetLeftMargin)
- Minor fix in PERL highlighting.
- 0.18
- 1995/05/13
- PERL Syntax Higlighting.
- Memory allocation problem in tab expansion.
- Wordwrap now strips all spaces on beginning of line (except on the first line of the paragraph).
- Tabs can be set to any number between 1 and 32.
- Changed names of buffer flags (WrapOn -> AutoWrap, UndoRedo -> Undo, ShowTab -> ShowTabs)
- New commands: ToggleAutoIndent, ToggleExpandTabs, ToggleShowTabs, ToggleUndo, ToggleReadOnly, ToggleKeepBackups, ToggleMatchCase, ToggleBackSpKillTab,
ToggleDeleteKillTab, ToggleSpaceTabs, ToggleIndentWithTabs, ToggleBackSpUnindents, ToggleAutoWrap.
- New commands: WinRefresh, ChangeTabSize, ChangeCIndent, ChangeLeftMargin, ChangeRightMargin.
- 0.17
- 1995/05/10
- Minor fix in word-wrap.
- Screen repaint problems when shelling out fixed.
- Blinking disabled for full-screen, high-intensity background colors can now be used.
- 0.16
- 1995/05/06
- Minor speedups in screen handling and highlighting.
- Regular expressions can now match start and end of words using < and >.
- Regexp replace can paste entire matched string using &
- Regexp search/replace could match part of just replaced string.
- New commands: MoveLastNonWhite, MovePrevEqualIndent and MoveNextEqualIndent, LineDuplicate, InsPrevLineChar, InsPrevLineToEol.
- New color config. 'C.Function' for functions in C highlighting mode.
- Improved CMode hilit, preprocessor hiliting improved (strings, comments, numbers)
- 0.15
- 1995/04/29
- Speed improvement in CMode auto indent.
- Delete command can now delete full tabs instead of converting them to spaces.
- When closing a modified file, editor prompts you to save it.
- Automatic indentation can now use tabs.
- Manual and automatic wordwrap.
- 1995/04/24
- Backspace can now delete full tabs instead of converting them to spaces (See BackSpace and KillBackTab).
- Backspace can unindent to previous indentation level.
- 1995/04/20
- 1995/04/12
- Configurable colors/keywords in C/REXX mode.
- 0.14
- 1995/04/07
- Characters could not be entered using AltGr on international keyboards.
- Immediatelly doing an undo on a newly loaded file deleted the first line.
- Ascii characters >= 128 can be now entered without quote command (C-Q).
- IPF Syntax highlighting.
- 0.13
- 1995/04/03
- Bug fix in regular expressions.
- Bug fixes in compiler support
- Editor clipboard can now be copied to/from PM clipboard.
- 0.12
- 1995/03/30
- Compiler support + error message parsing
- 1995/03/25
- Paren matching (Command: MatchBracket).
- Bug fixes in CMode smart indentation.
- 0.11
- 1995/03/11
- Unlimited undo now works again.
- 1995/03/18
- Entire blocks of C code can now be reindented (BlockReIndent)
- Search can now be case insensitive (SearchMatchCase - toggle). Option: MatchCase, Command: SearchMatchCase
- Regular expression find/replace works (case sensitive only)
- 1995/03/19
- Fixed a bug in redo (last command could not be undone)
- New option: KeepBackups -- if set to 0, backup files will be deleted after a succesful save.
- 0.10
- 1995/03/06
- Fixed CMode indent when tabs are present in the file.
- Prompts now retain previous text only if you try to edit it.
- 1995/03/04
- 4DOS/4OS2 style filename completion (FileOpen, ...).
- 1995/02/25
- New load routine, much faster in some cases.
- Undo/Redo can now be limited (if you hate to waste memory).
- 1995/02/19
- C Mode indentation level can now be specified (C.Indent)
- Bug fixes in screen redraw.
- Editor will now scroll text instead of always redisplaying the screen.
- Regular expressions (Search only).
- 0.09
- 1995/02/08
- First public release (Version 0.09b)
Things To Do
Short term:
- Improve documentation
- DrawMode
- Block sort/detab/entab, copy-w/append, cut-w/append
- Piping block to program redirection of program output to buffer
- HexMode
- REXX macros support.
- Menus should determine keybindings automatically.
Future:
- PM Version.
- Script language (C like, also REXX support).
- CVS/RCS support.
- Save/Restore desktop.
- Regexp optimizer & improved regexps.
Comments and suggestions are appreciated.