Feedback Search Top Backward Forward
EDM/2

A Programmer's Editor Shootout

MED Multiplatform Text Editor for Programmers

Version 1.21 Build November 7 01:06:06 1997

Written by Andrew Pitonyak

 
Rev-1 Rev-2 Rev-3 Rev-4 Rev-5 Rev-6 Rev-7 Rev-8 Rev-9 Rev-10 Rev-11

Introduction

MED is a full featured, highly customizable programmers editor.

Packaging and Installation

The packaging consists of a single zip file and the installation is a manual process which is outlined in an included text file.

  1. Copy the executable to a directory in the path.
  2. Copy the help file to a directory in the help-path.
  3. Create a directory for the configuration files and copy them there.
  4. Optionally add an environment variable to the config.sys indicating where the configuration files are to be stored.
  5. Verify the environment variable tmp (or TEMP) is set.
A partial list of features follows:
  • Search and Replace across all buffers
  • Multiple file/directory search
  • Regular expression search
  • brace matching (free definable)
  • configurable Syntax-Highlighting (video display and printer) Java, C, C++, REXX, Ada, Pascal, Fortran, Modula-2, config.sys, makefile, ipf, tex, rc, dlg, asm, ipp, list, and a few more.
  • configurable Section Browser
  • configurable Section Display
  • hypertext like Section searching
  • Skeleton files
  • configurable compiler support
  • configurable support of third-party Online-Help and EPM NDX files
  • configurable keyboard which defaults to word star
  • configurable toolbar
  • configurable line numbering
  • configurable context menu
  • configurable Autosave
  • configurable print function (formatted, raw ASCII)
  • configuration via command line
  • unlimited number of edit windows
  • unlimited number of views
  • auto file reload at startup
  • "Window Monitor"
  • up to 99 backups per file
  • persistent column blocks
  • easy to use macro recorder
  • line sorting
  • various word functions
  • graphic drawing function
  • word wrap function
  • Loading/saving cursor position
  • persistent bookmarks
  • global visible anchors
  • enhanced File selector
  • DDE (Dynamic Data Exchange)
  • automatic recognition of unix-format files * MS Windows code page
  • port * pipe-operator support
  • Drag & Drop support
MED uses one primary window and all open windows are children of this main window. All of the standard commands for arranging the child windows are available. Moving between windows is easy accomplished using a special "window monitor" window which is available with the F8 key. This allows far more windows to be listed than can be comfortably shown in a menu.

MED includes syntax highlighting for an entire slew of file types including Java, C, C++, REXX, Ada, Pascal, Fortran, Modula-2, config.sys, makefile, ipf, tex, rc, dlg, asm, ipp, list, and some others. It is easy enough to add your own syntax highlighting if there is a file type you wish to edit which is not currently supported. I added syntax highlighting for .bat files. Add the following lines to the end of the MED.SYN file:


  #==================================================================
  # Syntax highlighting for DOS batch files

  files:  *.bat

  # Word Wrap status
  # current [col]  (use current status, set wrap column to [col])
  # on      [col]  (activate and set wrap column to [col])
  # off            (deactivate)
  # disabled       (word wrap not allowed)
  wordWrap: disabled

  sectionRegexp:        ^CALL=|^SET
  sectionDisplayRegexp: (^CALL=|^SET)[ ]*(.*)
  sectionBrowserMainKey: 1
  sectionBrowserOrder:   1, 2
  sectionDisplayOrder:


  inf: view.exe  cmdref  *

  caseSensitive:  no
  checkCommentInString: no

  color: darkpink, normal, darkpink, bold
  token: CALL

  color: blue, normal, blue, bold
  token: ECHO OFF ON CLS CHOICE FOR IN DO GOTO IF NOT ERRORLEVEL
  token: EXIST PAUSE REM SHIFT

  color: red, normal, red, bold
  token: APPEND ASSIGN ATTRIB BACKUP CD CHDIR CHCP CHKDSK CLS COMMAND
  token: COMP COPY CTTY DATE DBLSPACE DEBUG DECOMP DEFRAG DEL ERASE
  token: DELOLDOS DELTREE DIR DISKCOMP DISKCOPY DOSHELP DOSKEY DOSSHELL
  token: EDIT EDLIN EMM386 EXE2BIN EXIT EXPAND FASTHELP FASTOPEN FC FDISK
  token: FORMAT GRAFTABL GRAPHICS HELP INTERLNK INTERSVR JOIN KEYB LABEL
  token: LOADFIX LOADHIGH LH MD MKDIR MEM MEMMAKER MIRROR MODE MORE MOVE
  token: MSAV MSBACKUP MSCDEX MSD NLSFUNC PATH POWER PRINT PROMPT QBASIC
  token: RD RMDIR RECOVER REN RENAME REPLACE RESTORE SET SETVER SHARE
  token: SORT SUBST SYS TIME TREE TYPE UNDELETE UNFORMAT VER VERIFY VOL
  token: VSAFE XCOPY

  Color: red, normal, red, bold
  symbol: :@*?%()=,;+-/&~[]{}|^<>#

  color:   darkcyan, normal, darkcyan, outline
  eolCom:  REM
  comCol:  1
I was unable to find any problems or discrepancies with the syntax highlighting code. When the syntax highlighting is defined, there is an option to set how word wrapping is done for different file types. The options are:
  • Use current status with an optional wrap column
  • Turn wrapping on with an optional wrap column
  • Turn word wrapping off
  • Disable word wrapping so it is not even available from the menu
Word wrapping is disabled for C++ files and no behavior is defined for regular text files. I found that if I enabled word wrapping, jumped to a C++ file, and then jumped back to my text file, word wrapping is turned off. This is slightly annoying but understandable behavior. If I really wanted to force word wrapping on for all files ending with .txt, this is easily accomplished. I have noted this behavior on many different text editors.

The default key bindings are the same as the Wordstar editor. MED has an option called "persistent selection". When it is enabled, highlighted text stays highlighted even when the cursor is moved and pressing the DEL key will delete the character under the cursor rather than deleting the highlighted text. The standard Wordstar key combination Ctrl+KY is used to delete a block of text. If you do not like this Wordstar like behavior, you can simply disable persistent selection.

It is simple to define your own macros and to assign them to key commands if you desire. The macro language is suitable for many tasks. The primary limitations are that it does not contain looping instructions, variables, and conditionals. This is suitable for the majority of tasks. Macros can be run on start up based on command line options.

I configured MED to keep two backups of every file that I edit. It appends ~0 and ~1 to the end of my backup files. You can also configure MED to append a time and date stamp to the end of the file. This only works if the backups are stored on a drive that supports long file names. I store all of these backup files in my special backup directory. Although saving the backups with the same name is not an option, the entire file name is retained in the backup file name.

Med supports setting five anchor locations in each file. Fortunately, you can use these to jump between open files. This is an excellent feature. The anchors are set using Alt+1 thru Alt+5 and you jump to the different anchors using Ctrl+1 thru Ctrl+5. I find myself wondering why there are only five anchors. Although I rarely use more than three, programmatically it should not have been any more difficult to provide ten anchors. I used this feature frequently while editing source files.

If you simply desire to bounce between two locations in a file, there are save and restore cursor commands. Move the cursor to the first location and save the cursor from the edit menu, or use the hot key Ctrl+PgUp. Now move the cursor to the second location. Pressing Ctrl+PgDown will immediately move the cursor to the first location. Pressing Ctrl+PgDown again will return the cursor to the second location.

The most flexible method to quickly move between points in MED is to use named bookmarks. When a bookmark is created you enter a descriptive name. Pressing Alt+J brings up the bookmark dialog where you can choose the named bookmark you desire. There are also commands to move forward and backwards through the list of bookmarks.

MED is able to search for text across both open text buffers and files. It can not do a replace operation on files, but finding text in open files is very flexible and supports the use of regular expressions. This was very useful when I could not remember which file contained the class I desired to edit.

MED supports "Skeleton Files". These are files which are used as templates when a new file is opened. If I use a common format for all of my hpp files, then I can create a common "skeleton file" which is used as a basis for all new hpp files. This feature has a lot of potential.

I found a very useful command for lining up the comments in my C++ code. If I use Alt+I rather than the TAB key, the cursor is moved to the right until it lines up underneath the beginning of a word. Assume that I have the following lines of code:


line 1: printf("hello\n");               // Hello
line 2: for(;;)
line 3:   printf("world!\n");X// World
With the cursor represented with the character X. If I press Alt+I once I will have the following:

line 1: printf("hello\n");               // Hello
line 2: for(;;)
line 3:   printf("world!\n");            // World
While editing a C or C++ file, each function in the file is listed alphabetically in a drop down list in the upper right of the screen. This allows you to quickly find a particular function. If you highlight a function call in your source code and press Ctrl+Return the cursor will be moved to where the function is implemented, even if it is in a different file. This can also be used to find the definition of a class or structure. If after pressing Ctrl+Enter the desired function implementation is not found in the current buffer, MED searches the source files in the current directory. As the command Ctrl+Return is used, a list of locations is saved and Alt+Return is used to return to the original locations.

MED is easy to use and full of pleasant surprises. Get a copy and check it out.

Information

MED can be downloaded from:

http://ourworld.compuserve.com/homepages/matthias_pfersdorff/
http://www.bmtmicro.com

The price of MED is US $25.

MED can be registered with BMT Micro, paid by direct funds transfer in Germany, or by regular mail. Instructions are included with the package.

E-mail: Matthias_Pfersdorff@compuserve.com