Flag of Sweden
Andreas Rejbrand’s Website

Rejbrand Text Editor: Documentation

Back to program download page

Introduction

Rejbrand Text Editor is an advanced Unicode text editor for Microsoft Windows (desktop application). This document describes the basics and the more advanced features of the software.

Screenshot of Rejbrand Text Editor

Keyboard Commands

Moving the Caret

Left

Moves the caret one character to the left.

Right

Moves the caret one character to the right.

Up

Moves the caret to the previous line.¹

Down

Moves the caret to the next line.¹

Ctrl+Left

Moves the caret one word to the left.

Ctrl+Right

Moves the caret one word to the right.

PgUp

Moves the caret one screen up.

PgDn

Moves the caret one screen down.

Home

Moves the caret to the beginning of the current line.

End

Moves the caret to the end of the current line.

Ctrl+Home

Moves the caret to the beginning of the file.

Ctrl+End

Moves the caret to the end of the file.

Left mouse button

Moves the caret to the character position just below the mouse cursor.

Shift+Ctrl+Alt+C

Enables or disables the possibility of the caret to be positioned beyond the end of line (EOL).

Alt + Scroll wheel

Moves the caret to the previous or next line.¹

¹ If “Caret beyond EOL” is enabled, the column will not change. If “Caret beyond EOL” is not enabled, the column will be changed to the maximum of the previous column and the length of the new line. If you repeatedly press the Up and Down arrow keys, the initial column of the caret will be remembered, and each time the caret is moved to a new line, the column will be set to the maximum of the initial column and the length of the new line.

Editing the Text

Character key (e.g. A)

Inserts the character in the text at the current caret position, replacing any selection.

Backspace

Deletes the current selection, if any, or deletes the character to the left of the caret.

Ctrl+Backspace

Deletes the current selection, if any, or deletes the word to the left of the caret.

Delete

Deletes the current selection, if any, or deletes the character to the right of the caret.

Ctrl+Delete

Deletes the current selection, if any, or deletes the word to the right of the caret.

Ctrl+Shift+Up

Swaps the current line and the line right above the current line. (This is like Shift+Alt+Up in Microsoft Word.)

Ctrl+Shift+Down

Swaps the current line and the line right below the current line. (This is like Shift+Alt+Down in Microsoft Word.)

Ctrl+D

Clears the current line.

Ctrl+Shift+Space

Increases the indent on all selected lines.

Ctrl+Shift+Backspace

Decreases the indent on all selected lines.

Ctrl+X

Cut: Removes the current selection and places it to the clipboard.

Ctrl+C

Copies the current selection to the clipboard. If there is no selection, the current word is copied.

Ctrl+V

Paste: Replaces the current selection, if any, with the content of the Windows clipboard.

Ctrl+Shift+V

Paste as: Displays the “Paste as” dialog box. Using this, you may, for instance, paste a number of plain-text lines as an HTML list, or as a set of HTML paragraphs.

Screenshot of Rejbrand Text Editor: Paste As dialog box

Ctrl+Shift+Alt+V

Pastes the contents of the clipboard as an overwriting block with its upper-left corner (character) at the caret.

Ctrl+Z

Undoes the previous operation in the undo list.²

Ctrl+Y

Redoes the next operation in the undo list.²

Ctrl+Shift+Z

Displays the History window, showing the version history of the current file.

Screenshot of Rejbrand Text Editor: History dialog box

Ctrl+U

When used with a hexadecimal codepoint (e.g. 222b) just to the left of the caret, the number is replaced by the corresponding Unicode character. (This is like Alt+X in Microsoft Word.)

Left mouse button

Click and hold to drag the current selection, to move it to a new location in the file. Hold down Ctrl, when initiating the drag operation, to copy instead of move.

Insert

Toggles insertion/overwrite mode. The current mode is shown in the status bar (INS or OVER) and by the caret (❘ or █).

Pause

Toggles read-only mode on/off.

² Most contemporary Windows text editors offer multi-step undo. But most of these share the established Windows multi-undo model, which has a major flaw: if you undo a number of steps, to history version X of the file, say, and then modify the file, the undo history is truncated at X, so all history versions after X are lost (you cannot “redo” these).

This is dangerous, for instance, if you undo a large number of steps to recover a string you want to copy to the clipboard with the intention of redoing all steps immediately afterwards. If you accidently make an edit to the file before or after you copy the string (say, by slipping and pressing C instead of Ctrl+C), all changes you made to the file after the restored version are permanently lost.

In Rejbrand Text Editor, this “flaw” doesn't exist: instead, when you make an edit and you are not at the end of the history stack, the old, restored, version is copied to the end of the stack, and no version in the history is deleted.

Working with Selections

Shift+Left

Expands the selection one character to the left.

Shift+Right

Expands the selection one character to the right.

Ctrl+Shift+Left

Expands the selection one word to the left.

Ctrl+Shift+Right

Expands the selection one word to the right.

Shift+Up

Expands the selection one line upwards.

Shift+Down

Expands the selection one line downwards.

Shift+Home

Expands the selection to the beginning of the current line.

Shift+End

Expands the selection to the end of the current line.

Alt + any of the above

Creates a block selection instead of a regular (line-based) selection.

Screenshot of Rejbrand Text Editor, displaying a block selection

Shift+PgUp

Expands the selection one screen upwards.

Shift+PgDn

Expands the selection one screen downwards.

Shift+Ctrl+Home

Expands the selection to the beginning of the file.

Shift+Ctrl+End

Expands the selection to the end of the file.

Ctrl+A

Selects the entire file. If the entire file is already selected, the selection is removed instead.

Shift+Ctrl+A

Selects the entire word.

Ctrl+L

Selects the entire line.

Shift + Left mouse button

(If not clicking on a selection.) Click to expand the selection to the character position where clicked.

Left mouse button

(If not clicking on a selection.) Mouse down and move to create and expand a selection to the character position just beneath the mouse cursor.

Ctrl + Left mouse button

(If not clicking on a selection.) Mouse down and move to create and expand a block selection to the character position just beneath the mouse cursor.

Ruler and left-margin click

If the ruler is visible, clicking it will select the entire line. If the ruler is not visible, clicking the left half of the left text margin will do the same.

Scrolling the Window

Alt+Left

Moves the screen scroll pos one character to the left.

Alt+Right

Moves the screen scroll pos one character to the right.

Alt+Up

Moves the screen scroll pos to the previous line.

Alt+Down

Moves the screen scroll pos to the next line.

Alt+PgUp

Moves the screen scroll pos one screen up.

Alt+PgDn

Moves the screen scroll pos one screen down.

Alt+Home

Moves the screen scroll pos to the beginning of the file

Alt+End

Moves the screen scroll pos to the end of the file

Alt + Left mouse button

Click and hold to move the screen scroll pos.

Scroll wheel

Scrolls the document vertically.

Shift + Scroll wheel

Scrolls the document vertically, one pixel per message.

Scroll Lock

When activated, all mouse and keyboard commands move the screen scroll pos instead of the caret (without the need of Alt).

Middle mouse button (wheel)

In the editor: starts panning.

Zooming the Window

Ctrl++

Zoom in

Ctrl+

Zoom out

Ctrl+0

Set zoom to 100%

Ctrl + Scroll wheel

Zoom in and out

Working with Files and Tabs

Ctrl+N

Creates a new, empty file, in a new tab.

Ctrl+O

Opens an existing file in a new tab.

Shift+Ctrl+O

Reverts the buffer to the last saved version of the file.

Ctrl+W or Ctrl+F4

Closes the current file (and tab).

Shift+Ctrl+W

Closes all open files (tabs).

Ctrl+S

Saves the buffer to the current file, if any, or prompts for the name of a new file to save the buffer to.

Shift+Ctrl+S

Prompts for a file name and saves the current buffer to that file.

Ctrl+F9

Asks Windows to open the current file (the last saved version of the buffer) using the associated application.

Shift+Ctrl+F9

Opens Windows Explorer in the folder containing the current file, and selects the file in the folder.

Ctrl+P

Displays the Print dialog box, in order to print the buffer using a (physical or virtual) printer.

Shift+Ctrl+Alt+X

Creates an HTML document with the current text and its formatting (due to line classes and interactive formatting (syntax highlighting)). Hint: When the export is complete, the HTML document is opened in a new tab. You may then press Ctrl+F9 to open it in the default browser.

Ctrl+Tab

Goes to the next tab (file) in the tab (file) list.

Shift+Ctrl+Tab

Goes to the previous tab (file) in the tab (file) list.

Middle mouse button (wheel press)

On a tab: closes the tab (file).

Ctrl+T

Duplicate buffer/tab: creates a new buffer (tab) with the text from the current buffer. The new buffer will not correspond to a file system file, will not have the history of the original buffer, and will not have the “modified” flag set.

Shift+Ctrl+T

New buffer/tab from selection: creates a new buffer (tab) from the currently selected text. The new buffer will not correspond to a file system file, will not have the history of the original buffer, and will not have the “modified” flag set.

Find

To search the document, press Ctrl+F (for “find”) and enter the search phrase. The matches will be highlighted in the text, and you can navigate between them using F2 (previous match) and F3 (next match). Press Esc to close the search bar and set focus to the editor again; you can continue to use F2 and F3 until you modify the text in the editor.

While the caret is inside the search box, you can also go to the next match by pressing Enter and the previous match by pressing Shift+Enter (instead of F3 and F2, respectively).

Screenshot of Rejbrand Text Editor searching for a phrase in a document

To perform a Replace All operation (either in a selection or in the entire text), press Ctrl+R (for “replace”).

Screenshot of Rejbrand Text Editor: The Replace All dialog box

Working with Bookmarks

Shift+Ctrl+n (where n = 1..9)

Associates bookmark n with the current caret location.

Ctrl+n (where n = 1..9)

Moves the caret to bookmark n.

The contextual (right-click) menu of the editor can also be used to manage bookmarks. Bookmarks are also shown in the ruler. Bookmarks work with all editor features. For instance, bookmarks are automatically updated when you use features like Sort lines, Truncate lines, Perform word wrap, Filter lines, and Make lines unique.

Multiple Carets

Rejbrand Text Editor supports a feature known as “Multiple-Caret Mode”. In this mode, you can have multiple carets in the document at the same time. When you press a character key (like A) or backspace, the appropriate action will be performed at each caret. To enter this mode, press Ctrl+M (for “multiple”); then a new caret will be created every time you click a character position in the text.

You can also enter this mode by pressing Ctrl+Up or Ctrl+Down, which will also create a new caret on the line above or below the current caret, respectively (at the same column as the current caret).

Screenshot of Rejbrand Text Editor, in multi-caret mode

To exit the multiple caret mode, press Esc.

HTML

Have a look at the Insert/(X)HTML submenu to see the many shortcuts used to quickly insert HTML elements in the text.

Miscellaneous

Ctrl+Q

Transforms the selected text using ROT-13.

Shift+Ctrl+U

Transforms the selected text to upper case.

Shift+Ctrl+L

Transforms the selected text to lower case.

F4

Shows or hides the ruler.

F5

Inserts the current date and time at the caret, replacing any selection.

Shift+F5

Opens the “Date and time” dialog box.

F6

Moves the keyboard focus sequentially between different key GUI elements, such as the tab list and the editor (like in Microsoft Word).

F7

Displays the Character window, used to find, display, and insert Unicode characters.

Screenshot of Rejbrand Text Editor: Character Information tool window

Screenshot of Rejbrand Text Editor: Character Browser displaying search results

Screenshot of Rejbrand Text Editor: Character Browser displaying a Unicode BMP block

Screenshot of Rejbrand Text Editor: Character Browser displaying a Unicode BMP block

F8

Displays the Character window and initiates the “Search for string...” action, so you can quickly search the Unicode database for a given character (using its description).

F10

Enables or disables highlighting of the current line.

F11

Enables or disables highlighting of matching brackets.

F12

Enables or disables the visual display of invisible characters (whitespace characters).

Ctrl+F7

Displays statistics about the file, such as the number of characters, lines, and words. You may copy this data to the clipboard, by pressing Ctrl+C when the dialog box is visible.

Screenshot of Rejbrand Text Editor: Statistics dialog box

F9

Displays the Multi-Character Input dialog box (see below).

Get Help

F1

Displays (more or less) this help text.

Screenshot of Rejbrand Text Editor: On-line (F1) documentation

Shift+F1

Displays the list of all currently configured auto-replace codes (like \alpha for the Greek letter α; see below).

Screenshot of Rejbrand Text Editor: Displaying the installed auto-replace list (Shift+F1)

Ctrl+F1

“Tip of the Day”: Displays small tips about using Rejbrand Text Editor.

Screenshot of Rejbrand Text Editor: Displaying the Tip of the Day dialog box

Look at the menu bar for information on commands that do not have associated keyboard shortcuts. Information about each command is displayed in the status bar.

Screenshot of Rejbrand Text Editor: File menu

Screenshot of Rejbrand Text Editor: Edit menu

Screenshot of Rejbrand Text Editor: Find menu

Screenshot of Rejbrand Text Editor: Insert menu

Screenshot of Rejbrand Text Editor: Options menu

Screenshot of Rejbrand Text Editor: Encoding menu

Screenshot of Rejbrand Text Editor: Tools menu

Screenshot of Rejbrand Text Editor: Tabs menu

Screenshot of Rejbrand Text Editor: Help menu

Truncate Lines and Filter Lines

Using the “Truncate lines” feature (Edit/Truncate lines...), you can truncate all lines in the document or in the current selection at a fixed character column or at the Nth occurrence of a given character on the line, counting from the beginning or from the end of line.

Screenshot of Rejbrand Text Editor: Truncate Lines dialog box

Using “Filter lines” (Edit/Filter lines...), you can selectively keep or remove all lines in the text that match a given criterion.

Screenshot of Rejbrand Text Editor: Filter Lines dialog box

Sorting and Wrapping

You can sort lines (Edit/Sort lines...) and make lines unique (Edit/Make lines unique). You can also perform a static, but automatic, word wrap (Edit/Perform word wrap...).

Screenshot of Rejbrand Text Editor: Sort Lines dialog box

Screenshot of Rejbrand Text Editor: Word Wrap dialog box

Character Find

In addition to the usual text search feature (described above), you can search your text for individual Unicode characters matching a given criterion:

To perform a character search, use Find/Character search...

Screenshot of Rejbrand Text Editor: Character Search dialog box

Colour Selection

Use Insert/Colour code... to display the Rejbrand Colour Selector. The chosen colour will be inserted in the text as an HTML hexadecimal colour code (#RRGGBB). If such a code is selected when you invoke the menu item, the Rejbrand Colour Selector dialog box will display this colour when opened.

Screenshot of Rejbrand Text Editor: Rejbrand colour selector dialog box

Text Encodings

When opening a text file in Rejbrand Text Editor, the application will try to determine the encoding of the file.

In most cases, the application will guess the correct encoding and simply open the file. If the encoding cannot be positively determined, a dialog box will ask you for the encoding to use; the most probable candidate is selected by default, and you can preview the text in the different encodings before opening the file.

Screenshot of Rejbrand Text Editor: Encoding selection dialog box

If the file is still opened using the wrong encoding, you can select a new encoding from the Encoding menu. If you choose a new encoding immediately after the file has been opened, Rejbrand Text Editor will ask you if you want to reopen the file using the newly specified encoding.

Statistics

Using Tools/Statistics (Ctrl+F7), you can display basic statistics about the current file, such as the number of characters, lines, and words; this was described earlier.

Screenshot of Rejbrand Text Editor: Statistics dialog box

Using Tools/Advanced statistics, you get a summary of the Unicode characters present in the text. You are presented with the count of the characters in each of the 161 BMP blocks, as well as the number of control characters and noncharacters.

Screenshot of Rejbrand Text Editor: Advanced Statistics dialog box

URLs

When right-clicking a URL, there is an option to open it. (This also works for mailto: addresses.)

Screenshot of Rejbrand Text Editor: Contextual popup menu showing 'Open URL' menu item

Character Codes

In Rejbrand Text Editor, you can insert many non-keyboard Unicode characters by entering specific “codes”. For instance, typing \alpha followed by some punctuation mark or whitespace yields α, the Greek small letter alpha, whereas \Alpha yields the capital letter Α. In this way, all Greek letters can be inserted. But there is also support for most mathematical operators, like \cdot (⋅), \partial (∂), \int (∫), \union (∪), \deg (°), \sum (∑), \not (¬), \and (∧), \in (∈), \contains (∋), \iint (∬), \oint (∮), \coproduct (∐), \therefore (∴) etc.; many typographical characters, like \en (–), \em (—), \para (¶), \asterism (⁂), \no (№), etc.; and many other characters, like \airplane (✈), \anchor (⚓), \female (♀), \recycling (♲), \thunderstorm (☈), \warning (⚠), \wheelchair (♿) etc. In total, 367 predefined “codes” are installed by default. Press Shift+F1 to see the complete list (and their replacement texts).

Screenshot of Rejbrand Text Editor: Displaying the installed auto-replace list (Shift+F1)

The list of recognised “codes”, and their associated replacement texts (characters), can be modified to suit the personal needs of the user. To modify the list, use the tool “AutoReplace Editor” which is installed with Rejbrand Text Editor. You can start AutoReplace Editor using the Rejbrand Text Editor group on the Start menu, or you may simply run (Win+R) “AutoReplace”.

Screenshot of the AutoReplace Editor (autoreplace.exe)

If you have an instance of Rejbrand Text Editor running while making changes to the auto-replace list (e.g., using AutoReplace Editor), the changes will be visible only to new tabs you create in Rejbrand Text Editor.

Using Options/“Auto replace”, you can toggle the auto replace feature on or off. If you have entered a code which has been replaced, and you want the code back, simply undo the replacement by pressing Ctrl+Z.

Multi-Character Input

When you have inserted the hyphen-minus character (-) in the text, you may press F9 to display a dialog box with different kinds of hyphens, minus signs, and dashes: hyphens of different line-breaking types, the minus sign, EN dash, EM dash, and so on. The character you select will replace the hyphen-minus.

Screenshot of the character selection dialog box

When you have inserted the asterisk character (*) in the text, you may press F9 to display a dialog box with different kinds of asterisks, bullets, and points, such as typographical bullets and mathematical operators for multiplication and other binary operations. The character you select will replace the asterisk.

Screenshot of the character selection dialog box

When you have inserted a single or double quotation mark in the text, you may press F9 to display a dialog box with other kinds of (single or double) quotation marks, including typographical quotation marks in English, German, and Swedish. The quotation mark you select will replace the one you typed initially.

Screenshot of the character selection dialog box

In each case, you select the character you want (in the dialog box) using the arrow keys, character keys, and Enter; you may also double-click the character you want. To close the dialog box without changing the character, press Escape. (Or close it any other way you like:

For instance, typing ", F9, R, Enter, will insert ” (U+201D: RIGHT DOUBLE QUOTATION MARK).

Hint: You may also use character codes to insert different characters related to hyphen-minus and the asterisk. For example:

Known Limitations

Future Additions

Additional Help

If you need additional assistance, please write an e-mail to the software developer at andreas@rejbrand.se. Also, if you find a bug (no matter how “small”) or have any suggestions, please write a letter.

If you are writing in Swedish, you should also have a look at Språkvård and semikolon.info.