|
OxEdittm is an easy to use, yet powerful text editor. Its support for syntax highlighting, column editing, and running external modules make it especially useful for developing and running Ox programs. OxEdit is installed with Ox Console, but can be downloaded separately. Ox Professional includes the OxMetrics front-end, which provides graphics and data manipulation in addition to OxEdit text editing facilities. |
OxEdit is part of the OxMetrics family of software products, see www.oxmetrics.net and www.doornik.com.
OxEdit has been developed using wxWidgets.
I wish to thank Marc Doornik, Steve Moyle and Gunnar Baardsen for giving many useful suggestions, which improved the usability of OxEdit enormously.
Jurgen Doornik, the copyright owner of OxEdit, grants a non-exclusive license without charge to any individual or institution who intends to use OxEdit for any legal purpose. You may not modify, create derived works, or sell the software, or make it available for download. However, you may share it with friends and colleagues, and make it available for general use within an institution. Jurgen Doornik reserves the right to terminate the freeware status for future versions of OxEdit. No warranty is given for the use of OxEdit. OxEdit does not come with any spyware, adware, or mailware bundled inside it.
Upgrades can be downloaded from www.doornik.com.
Check for recent fixes and outstanding issues.
OxEdit 4 was a major upgrade of OxEdit. To match OxMetrics, the version number jumped straight from 1.62 to 4.
Some highlights of the changes are:
Recent fixes are listed here.
To match OxMetrics, the version number jumped straight from 1.62 to 4.
A column selection can be made with the mouse:
or with the keyboard:
A column selection can be dragged and dropped:
Use the Paste as Column command to insert text from the clipboard as a column. Use the Sort command to sort using a column selection. It is possible to restrict a find/replace operation to a column selection.
OxEdit uses definition files to define file types. The definition file lists the extensions to which the style applies. This allows for syntax coloring, definition of comment, default use of tabs, etc. OxEdit automatically reads in all the .def file from the directory where the executable file resides. In addition, you can specify an additional folder for OxEdit to load definition files from using Preferences/Options. These definitions will have precedence.
The following example is a reduced version of the cpp.def file (the number of keywords has been cut down):
Three types of identifiers are used in the color coding:
The def file contains up to four sections:
Lists the file extensions to which this style should be applied. Here all *.c, *.h, *.cpp and *.hpp files will be treated as having this style.
Lists the defined keywords. Keywords are displayed in blue. If a keyword has an embedded space, enclose it in double quotes.
Lists the defined functions. Keywords are displayed in bold dark gray. If a function name has an embedded space, enclose it in double quotes.
Lists additional options. Currently available are:
| case= | Set to 0 to make keyword identification case insensitive. For example for html files: case=0. |
| comment= | Defines non-nested comment blocks. An example is given above. |
| comment_eol= | Defines
the end-of line style comment. Everything after the text is considered comment,
up to the end of the line. Examples are
for
C++: comment_eol=//
for TeX/LaTeX: comment_eol=% |
| comment_fortran= | Possible values are 0 or 1. When comment_fortran=1 is used, a character in the first column of a line indicates comment. |
| comment_nested= | Defines nested comment blocks. This is used in the Ox language: comment_nested=/* */ |
| keyword_char= | Defines all words following the symbol as keywords. This is used for TeX/LaTeX:in tex. def: keyword_char=\ |
| paren= | Use paren=1 to enable colouring of unbalanced parentheses: ({[. In addition, showing unbalanced parentheses must be switched on using Preferences/Options. When active, OxEdit will show unbalanced parentheses in bold red (the colour of numbers in the style of keywords). With large files, and many unbalanced parentheses, screen painting can become slow. |
| string_char= | Defines the character in which strings are embedded, e.g. fortran. def uses: string_char=' |
| string_char2= | Defines the character in which strings are embedded for a second string type |
| tabsize= | Defines the tab size to be used. The default is 4 characters, which will be fine most of the time. For Fortran files it may be preferable to use: tabsize=6. |
| usetabs= | Defines whether tabs should be used. By default they are, but usetabs=0 uses spaces instead of tabs. |
| shownumbers= | Defines whether line numbers are displayed in the margin when the file is opened. By default they are not, so use shownumbers=1 to switch this on. |
| bold=
italic= sansserif= typewriter= |
These
defines the four text styles. The argument consists of two parts, which are
separated by a % symbol. Each component must be 32 character or less. For
example, in the html.def file:
bold=<b>%</b> italic=<i>%</i> sansserif=<font face="arial">%</font> typewriter=<tt>%</tt> The toolbars can be customized to add a button for these style changes. |
OxEdit help is available from the Help menu or the Help bar in the workspace. This is based on HTML files, and requires that a browser such as Firefox or Internet Explorer is installed.
In addition, OxEdit implements a Help system for modules. This requires a module to be defined for an extension and the path to the help files to be set. Then, when pressing F1 when the caret is on a keyword, OxEdit will search the html files for a reference to that word. If there is only one, it will jump there immediately. Otherwise it will offer a list of choices.
In more detail, the procedure works as follows, here described for Ox modules.
C:\Program Files\OxMetrics4\ox\doc\oxind*.html
Note that this refers to a set of files. However, this should not be all files, but just the index files.
Then, when pressing F1, when the caret is on println (say):
If you press F1 when not on text, the main html file will be started:
A marker allows for fast navigation through a document. A marker is shown as a small blue rectangle in the margin of the line.
To set a marker:
To clear a marker:
To go to a marker:
Markers are not remembered between sessions.
The running of external modules (executable programs or batch files) on a document is one of OxEdit's strengths, creating an integrated environment from separate building blocks. This process is highly configurable, and encompasses three types:
The Add/Remove Modules dialog on the Tools menu is used to add or remove modules. Some internal functionality is actually run as an external module - Find in Files is an example using OxGrep.
A default extension can be associated with a module. Files of that type can then be executed using the Run Default Module command (Ctrl+R or the running-person toolbar button for short). The second module in line with the same extension will be run when using second running man. All possible modules are listed on the Run menu, and on the context menu when right-clicking on a document tab at the bottom of OxEdit.
The Default Explorer Open command opens the document as by double clicking on it in the Explorer. If, for example, you can open an HTML file in the Explorer by clicking on it, you can do so the same using this command for an HTML file which is loaded into OxEdit.
Help for modules is normally also accessible from OxEdit.
A project is a collection of files grouped together in a project file (for which OxEdit uses the . oxp extension). Once a project is open, you can open a file from that project using the project bar in the workspace. OxEdit remembers for each project files: the window size, window position, and whether the file was open. This allows easy return to a previous project (the File/Open Previous Session command only relates to the previous OxEdit session). OxEdit will keep a list of most recently used projects on the file menu.
You can also open a Visual Studio .dsp project file. Such a project cannot be modified.
The following actions are available for a project:
Using the Open Project command command on the file menu. The currently open project (if any) will be closed. You will be asked whether OxEdit should close all currently open files.
Using the Close Project command command on the file menu.
Using the New Project command command on the file menu. The currently open project (if any) will be closed. You will be asked whether OxEdit should close all currently open files. Next, you will have the option to insert all open documents into the project.
Double clisk on a file name in the Project bar.
Right-click on the project view and select Add Files to Project. This will allow you to insert files into the project, or delete files from the project.
Select a file in the project view, right-click, and select Remove Project. This will delete the selected files from the project.
If you selected to load the previous session at startup (Tools/Preferences/Options), then the previous project is also loaded automatically.
The status bar is displayed at the bottom of the OxEdit window and consists of four areas:
One of: Win, Lnx, Mac for Windows (\r\n), Linux (\n) or Mac (\r).
If the file format is different from the default (ASCII) encoding, this is indicated by one of UTF8, UTF16, or UTF32. The can be followed by BE or LE to indicated big-endian or little-endian encoding.
The left margin indicates where the cursor is:
Double clicking on the margin toggles line numbering. In binary and hexadecimal mode, the position of the first character is shown in hexadecimal. Right clicking in the margin sets or clears a marker.
Three tool bars are displayed across the top of OxEdit, below the menu bar. An optional fourth holds just the document tabs and is situated at the bottom of the screen. The tool bars can be hidden and shown and customized from a right click on the bar. Customization allows adding or removing icons, and choosing small medium or large icon size (medium is the default).
The Find/Replace tool bar replicates most commands of the Find/Replace dialog. The two are actively linked, and the Find/Replace bar is often a convenient way to quickly search for text or execute search/replace actions. The default layout consists of:
| Find text | Specify the text to search for. The drop down list box holds previously used search texts. You can use a context menu (right click) to insert text from the clipboard. |
| Find down | Finds the next occurrence of the search text downwards from the current location of the caret. |
| Find up | Finds the next occurrence of the search text upwards from the current location of the caret. |
| Case sensitive | Toggle case sensitive searching on or off (if the button is down, the search is case sensitive). |
| Whole word | Toggle word matching on or off (if the button is down, the search will only find whole words). |
| Goto next instance | Finds the next instance of the currently selected text downwards from the current location. The selected text will become the default for subsequent searches. |
| Goto previous instance | Finds the previous instance of the currently selected text upwards from the current location. The selected text will become the default for subsequent searches. |
| Replace text | Specify the new text. The drop down list box holds previously used replace texts. |
| Replace Next | Replaces the current instance, or finds the next if it has not been found yet. |
| Replace All | Replaces all instance in the current document. |
| Replace All in Selection | Replaces all instance in the currently selected text block. |
OxEdit has three viewing modes:
This is the default viewing mode for a text file. This mode allows editing of the text.
This is the viewing mode, most useful for binary file. OxEdit checks whether a file is binary when loading it. If so, the viewing mode defaults to this binary mode. The position indicator on the status bar will show the position of the caret in decimal (the first character of the document is at byte 0).
In binary mode, there are no text lines. The screen lines are determined by the window width. Instead of lines in the margin, the position of the first character is shown in hexadecimal.
This is the alternative binary viewing mode. The display consists of two columns, with the text on the right, and the hexadecimal values on the left. The position indicator on the status bar will show the position of the caret in decimal (the first character of the document is at byte 0).