Using the Crimson Editor with mle
The Crimson Editor works very well as a front-end for mle on Windows machines. The editor is a general purpose text editor that has capabilities for (1) syntax highlighting, (2) user-defined tools and (3) execution of programs from within the editor.
This page provides information and extensions for using mle with the Crimson Editor. A number of configuration files are provided that provide syntax highlighting, and execution of mle programs from within the Crimson editor.
Note that version 3.72 of the editor is now supported by the Emerald Editor Community. There are a few differences between 3.70 and 3.72, so be sure you are installing 3.72. These instructions were modified for the editor on 11 Jul 2018.
The editor is available for free.
Installation and configuration of the Crimson Editor for use with mle is easy. Here are the steps. Download and install the Crimson Editor (version 3.72 only) on your Windows system. There are five small configuration files that must be installed to customize the editor for use with mle. I'll assume you installed the crimson editor in the default directory c:\program files\crimson editor:
- extension.mle: This file defines
the syntax files. It goes into
C:\Program Files (x86)\Emerald Editor Community\Crimson Editor SVN286M\link - mle.clr: This file defines the colors to use in syntax highlighting. It goes into
C:\Program Files (x86)\Emerald Editor Community\Crimson Editor SVN286M\schemes - mle.key: This file specifies the mle keywords for the editor. It goes into
C:\Program Files (x86)\Emerald Editor Community\Crimson Editor SVN286M\spec - mle.spc: This file specifies the mle language characteristics for the language. It goes into
C:\Program Files (x86)\Emerald Editor Community\Crimson Editor SVN286M\spec - mle.cmd: This file defines the mle commands available from within the editor. It goes into
C:\Program Files (x86)\Emerald Editor Community\Crimson Editor SVN286M\tools
The first time you run the editor, there are two steps to enable the highlighting and tools.
Two "rules" will help things work properly. First, include the extension ".mle" on mle programs. The editor will then recognize it as an mle program and will do syntax highlighting. The second rule is to not put spaces in the file name. Spaces in file names confuse the editor.
The editor has many useful features for text editing, and you can either explore the menus or read the documentation that comes with the editor. Five new tools are added for working with mle. You can access these tools from the Tools menu, or use shortcut keys.
- Ctrl-1 -- runs the mle source code in the current window in non-verbose mode (the file is saved then
mle [file]
) - Ctrl-2 -- runs the mle source code in the current window in verbose mode (the file is saved then
mle -v [file]
) - Ctrl-3 -- gives a help message for the word under the cursor position (
mle -h [word]
) - Ctrl-4 -- gives a help message for words that match that at the cursor position (
mle -H [word]
) - Ctrl-5 -- parses the mle source code in the current window and reports errorsn (
mle -p [file]
)
When you run the mle, the output that isn't redirected to another file will go to a DOS window. You can inspect, scroll, and copy the results as needed. Click on the close box to dismiss the window. If you send analytic output to an output file (for example using OUTFILE("myfile.out")
or OUTFILE(DefaultOutName)
you can open that output file in another tab in the editor. When the file is overwritten, the editor will ask to re-read that file.