Table of Contents

Intro To Multi-Edit

Multi-Edit has many powerful features, some of which you may not use or even be aware of. Many times, users call technical support asking: “How do I do this?” or “How do I set this up?” To help remedy this and save you some frustration, we've put together this section to show you some of the more important (and basic) features of Multi-Edit, thus getting you up and running faster and with a minimum of fuss. As you become more familiar with Multi-Edit, we encourage you to explore and “play” with some of the other features.

Opening And Viewing Files

Opening Files

Files can be opened by many methods. The standard method would be to use the file open dialog. Select File | Open, or click on the 'Open File' toolbar button. Selecting this option will display a file dialog in which a file can be selected. You may also access this Open File dialog by clicking ‘File Prompt’ in the Window List dialog which is available by selecting Window | List.

Alternatively, files may be quickly selected for editing by choosing from the list of most recently opened files at the bottom of the File Menu.

Multi-Edit also offers an “Open File Under Cursor” feature that allows you to open the filename under the cursor. Select File | Open file under cursor.

The FilePane Add-On is another alternative if you selected the “File Pane AddOn” checkbox when you installed Multi-Edit. You may access the FilePane via View | Files. (If Files is already checked, then use View | Navigation Pane.) You will initially get the message, “Unable to find FilePane database – no entries in pane!” This just means you haven't added any files or folders to the file pane yet. Add a file to the file pane by clicking the ‘Add File to FilePane’ button. Add a directory by clicking the ‘Add Directory to FilePane’ button. The depth of a directory is initially set to one, meaning the contents of subdirectories will not be listed. You may change this by clicking the 'Edit FilePane List' button, select your directory, click ‘Edit’, and set the “Depth:“ value to a higher number. (Setting the depth too deep can have a performance impact when the tree is created and refreshed.)

Saving Files

Multi-Edit offers several methods to save files. File | Save will cause the current file to be saved to disk under the existing filename. If the file has not been previously saved, you may select a filename and other options. Use File | Save As to save a file for the first time, or to change the filename and other options. File | Save All allows you to save all modified files in open windows. Use File | Close to close the current window and save modified files. Select File | Close All to close all Editing Windows and save modified files. You will also be prompted to save modified files when exiting Multi-Edit.

In addition, files may be saved using the Autosave operation. The options for Autosave and Backups can be configured in the Tools | Customize | Files | Autosave and Backups dialogs. You may also switch off autosaving unnamed files (filename is ”?No-File?”) by checking the box for “Do not autosave unnamed files” in the Autosave dialog. (See Backup and Autosave)

Viewing Files

Normally, Multi-Edit uses the standard MDI style windowing arrangement (each window contains one file with that file staying in the same window). In addition, Single Window mode (configure in Tools | Customize | Windowing) may optionally be used where a window is a view where each file is cycled through (this will be familiar to Brief users).

A variety of commands for navigating between, sizing, and manipulating windows are available. Many of these options are available from either the Window Menu or the Window List dialog (available via Window | List).

The following are some of the organizing features and their definitions:

• Hide/Unhide conceals/reveals the current window. When hidden, Next and Previous will skip this window.
• Zoom allows you to instantly maximize a window within the Multi-Edit environment or return it to its previous size. You can achieve the same results by clicking the left mouse button on the Minimize/Maximize buttons, or double-clicking on the window's title bar.
• Cascade provides ways to group your windows in a cascade arrangement (like tabbed index cards).
• Tile vertical arranges non-minimized windows into a vertically tiled arrangement.
• Tile horizontal arranges non-minimized windows into a horizontally tiled arrangement.
• Split will divide the current window in half, having two adjacent windows occupying the screen area previously occupied by the original window. You can use Split to view two or more files at the same time, or view two or more parts of the same file simultaneously. The latter is referred to as linking.

Navigating Windows

Multi-Edit provides numerous ways of navigating windows, the easiest of which is to use either the window tabs or buttons which are located above the window(s) and just below the tool bar on a default installation. Another way of navigating windows can be accomplished by using the Window List dialog. When a window is initially created, it is assigned a letter that is displayed in the lower left corner of the window. Clicking on the window letter will display the Window List dialog that contains all of the open windows as well as window properties such as read-only, modified, and linked. Finally, the window menu offers the following navigation commands that are also accessible via keystrokes.

Next (F6) moves you to the next window in alphabetical order.
Previous (SHIFT+F6) moves you to the previous window in reverse alphabetical order.
Window List (CTRL+F6) Brings up the window list.
You can also navigate through the windows in Z-Order (Z-Order is the order windows overlap.)
CTRL-TAB moves you to the next window in Z-Order.
CTRL-SHIFT-TAB moves you to the previous window in reverse Z-Order.

Hidden, minimized and system windows are skipped over during navigation.

The Window List Add-On is another alternative if you selected the “Window List AddOn” checkbox when you installed Multi-Edit. You may access the Window List Add-On via View | Windows. (If Windows is already checked, then use View | Navigation Pane.) In the Window List Add-On pane you may change the order of the windows by clicking the ‘Move Window Up’ and ‘Move Window Down’ toolbar buttons. You may also sort the windows by right clicking any window listed and selecting Sort. You may sort by Filename, Path, Extension, or Date. You may also use the toolbar buttons to Hide Window, Unhide Window, Minimize Window, Restore Window, Save File, Print File, Close File, or get a File Prompt to load a new file.

Viewing Modes

Using one or more of the following modes can modify the way a file is displayed in Multi-Edit:

Hex Displays the current file in Hex format. Available via Text | Hex mode. This is primarily used for editing binary files or for viewing unprintable characters in ASCII files. This mode can be enabled for binary files under Tools | Customize | Editing, check the box for “Edit binary files in hex”.

Selecting hex mode results in a side-by-side split: the left side is in hex; the right side is in ASCII. When editing in the left side, characters may only be entered in hex, with the overwrite mode always on. Hex mode is simply a different view of the current file. It does not assume that the file is binary, nor does it change the “file type”. Thus, template expansion, smart indent and other features work (if they are configured for that file) while you are editing a file in hex mode. If you wish to view line terminators for a file then you will need to load it as a binary file.

Collapse Collapse mode is available via View | Collapse. (If Collapse is already checked, then use View | Tool Pane.) Collapse mode allows you to view and edit a file in an outline-style format. You could for example, choose only to view lines that start at columns less-than-or-equal-to 8, or perhaps you only want to see lines that contain the word “ERROR.”

• You can also have separate Collapse Mode settings for each open file within Multi-Edit. Thus, you can have one file set to collapse on column 1, while another file collapses based on the keywords PROCEDURE or FUNCTION.
• The difference between using Collapse Mode and performing a Find All operation is that Collapse is more interactive, allowing you to quickly edit the viewed lines, selectively unhide the hidden lines, and perform block operations that either include or exclude hidden lines.

Line Numbering Line Numbering displays line numbers along the left margin of the editing window and may be enabled for the current file or for all files with a particular extension. Enable for the current file via Text | Line Numbers. Enable for all files with a particular extension via Tools | Customize | General | Filename Extensions, select an extension, click ‘Edit’, and check the box for Line Numbers.

Editing And Formatting Text

Editing And Formatting

Multi-Edit has many editing features, such as the ability to Undo and Redo changes to your files. This feature can be found by selecting Edit | Undo, Edit | Redo respectively, or by clicking on the 'Undo' or 'Redo' toolbar buttons. Of course there are many other features as well, including the ability to indent/undent blocks of text (select the text and press 'Tab' key to indent, 'Shift-Tab' to undent), change case (Text | Change Case), center lines (Text | Center Line), fill white space with tabs or spaces (Text | Convert Tabs), automatically format comments, and justify paragraphs. In addition, there is an enhanced Cut and Paste functionality with multiple buffers.

Blocks And Block Marking

Multi-Edit supports three types of block marking: line, stream and column. Each method of marking can be accessed from hot-keys, by using the mouse or from within the Edit menu. Additionally, you can mark lines or a stream of text by holding down the 'SHIFT' key while pressing the 'arrow' keys.

Search And Replace

Searching Within Multi-Edit

Search and Replace is one of Multi-Edit's most powerful features, enabling the ability to search for text, or search and replace text, even across multiple files. All of these features have been combined into one tabbed dialog for quick and easy access. All the search and replace functions can be found under the Search menu in the default command map.

Besides just finding literal strings, Multi-Edit allows patterns, called regular expressions, to be entered and found. Multi-Edit 2008 supports UNIX regular expressions, Perl regular expressions, and Classic Multi-Edit regular expressions. In addition, those regular expressions may be combined and saved as regular expression aliases, for future reference. (See Using Regular Expressions)

Global Expression Highlighting

With Global Expression Highlight, you can specify a search string or expression and see all occurrences of the found text highlighted in one or all of your specified files. This is persistent; you may edit the files as usual without disturbing the highlighting. This function allows paging through a file to quickly see how a string or variable is used. Select Search | Find, and click the Hilite tab.

Search strings cannot go across line boundaries when using Global Expression Highlight.

Incremental Search

Multi-Edit's powerful incremental search feature allows you to perform simple searches with ease. Place the cursor at the position from which you wish to begin searching, select Search | Incremental Search, and begin typing the string of characters for which you would like to search. Multi-Edit will search for the string as you type it in, highlighting the next occurrence of the search string in the file. Thus, you may not need to input the whole string to find the text for which you are searching. Once a string is found, the next or previous occurrence of that found string is located by using the 'Alt+N' or 'Alt+P' keys.

Book Marking Cursor Position

Multi-Edit supports two types of marking positions in text, a marker stack and a random access mark. Each file can contain up to ten of each type of mark. Markers are saved and restored across sessions.

The marker stack can actually be larger but only 10 per file are saved in the status file when exiting.

The marker stack is useful for saving a position in a file so that you can quickly return to it after moving elsewhere in the file. The system uses the marker stack for its own use such as when doing a file compare or matching a language construct (this should not interfere with the user dropped marks). Select Search | Push Position onto Marker Stack.

Random access marks allows you to drop a mark and reposition to that mark in any order. This is useful for switching between multiple locations in a file. Select Search | Set Random Access Mark.

Programming Language Support

The programming language support in Multi-Edit is quite extensive and includes the following:

Syntax Highlighting – Highlighting of keywords, symbols, brackets, numbers, strings, and comments.
Construct Matching – The ability to quickly position the cursor to a matching construct, such as finding a matching parenthesis, or moving between a Begin and End statement.
Smart Indent – The ability to indent the cursor in the correct position after a carriage return.
Tagging – The ability to find code and mark for later positioning. Such as finding all your functions/procedures, structures, types, etc., in all related files, making a list of them all, and then being able to quickly position to any of them. (See Multi-Tags below.)
Indenting Style – For example, how to expand curly braces for 'if' constructs in C-style languages, and highlighting of matching parenthesis.

To set language specific items, go to Tools | Customize | General | Languages, select your language, and click ‘Edit’. Most languages are already set up, so all you need to do is click the Formatting/Config button which brings up a Properties Setup dialog where you can control language specific items, such as Indenting Style.

Templates

Template expansion is one of Multi-Edit's most powerful and timesaving features. Template expansion allows you to easily and consistently write repetitive tasks in your code that would otherwise bog you down with extra keystrokes. For example, in C, one can type “i” and press the space bar and receive an if construct complete with curly braces and parenthesis.

These templates are completely editable and are not limited specifically to code items. The flexibility of the template system in Multi-Edit allows you to set up a template for virtually anything you can think of, everything from a comment header to an entire form letter is feasibly possible.

Compiling

Since programmers spend quite a bit of time in their editor, Multi-Edit includes an interface that allows you to easily run the compiler or other programs from within Multi-Edit. To compile, select Tools | Execute Compiler.

As with most things in Multi-Edit, it is completely user-configurable. See Adding Compiler Support in the chapter Adding Language Support.

Comparing Files

Comparing files within Multi-Edit is a breeze! To compare files, select Text | Compare Files and the BCDiffer dialog will appear. BCDiffer is created by Scooter Software, Inc. and a licensed version comes with Multi-Edit. Documentation on the usage of BCDiffer can be found within the BCDiffer Help file which is located in the Help subdirectory of your Multi-Edit installation and is titled as BCDiffer.chm. You can also go to the Help menu when BCDiffer is displayed.

Multi-Tags

Multi-Tags is an easy-to use, hypertext-like source code browser.

Run your source files through the Multi-Tags scanner to produce a database of functions/procedures, structures, types, etc., depending on the language being scanned.

Once the database is created, position your cursor on any function name (or other supported language object) and use Tags | Find tag under cursor. Multi-Tags will then locate the source file where that tag was defined and take your cursor to the definition. If a tag was defined in more than one place or file, then Tags | Find Again will locate the next occurrence.

Tags can also be located using the Tag View, which resides on the Navigation Pane and allows for quick access to tags in the currently loaded tag database. The Tag View also allows you to load and browse tag databases which aren't associated with the current file. (Access the Tag View via View | Tags (If Tags is already checked, then use View | Navigation Pane.)

Most of the languages supported by Multi-Edit currently support tags.

For more about Multi-Tags see Multi-Tags in the chapter Working in Multi-Edit under section Language Features.

Any text file may contain tags via explicit tags.

Project Management

A project contains a list of files for easy access, including non-text files, directories, tools, and FTP configuration. Project Management allows for containment of the many specific settings related to a particular project. All Project options take precedence over other options (i.e., Filename extension setups).

While the Project Manager keeps information on each individual project, it does not contain information on the files that were last opened or a search history. The Session Manager handles this function. When switching Projects, you should also switch to a matching session. This can be done automatically by setting the Tools | Customize | Projects – “Synchronize Projects to Sessions” option. When enabling this option, every project change will also change to the corresponding named session.

“Encoded status files for each dir” must be enabled in Tools | Customize | Sessions.

To start using projects, you will first need to create a project. Using the Project | Create Project function can do this. Project files have the .mep extension and will by default be created in the directory specified in the create function.

A Project consists of a ROOT section, which is all files that are contained in or are children of the project root folder. The Project Root folder will also be the default working directory when the project is opened. There is also an EXTERNAL section that contains all files that are outside the Root file.

In order to view a project, select the View | Project option.

Session Manager / Session Management

A session is a history of what was last done in Multi-Edit. This includes things like which files are open, how the windows are arranged, history of strings used in search and replace operations, the location of the cursor in each file, and what project was being edited. This way you can exit Multi-Edit, and when you restart Multi-Edit, you'll be back to where you were with all your files open, all the windows arranged, and everything else set back to the way it was when you exited.

Sessions can be stored in several different ways, configurable in Tools | Customize | Sessions. If you select the Restore Status Method as “Encoded status files for each dir”, then you may use the Session Manager. The Session Manager is available via File | Session Manager.

The Session Manager allows you to name each session and set the working directory for it. (Click the ‘Accept’ button when you've filled in the name and directory.) Multiple sessions can each have different layouts and settings. This allows you to configure work environments for each session or project. The session list can be sorted and sessions can be protected so that environment settings will not change. For example, Session X has two files open. If it is protected and another file is opened, the next time session X is started, only the two original files would be opened. If the session was not protected, all three files would be opened. Encoded status files are stored with a .mew extension in the Multi-Edit Config\Sessions directory.

Command line options are available to allow you to start a named session, start the last session, or to bring up the Session Manager on startup to allow you to pick from the list of sessions. To start the last session, append /SR to your command line which starts Multi-Edit. To bring up the Session Manager on startup, append /SM. To start a named session, append /SN<session name>.

Version Control Support

One of the main purposes of Version Control Support (VCS) programs is to help maintain and track versions or revisions to a set of files. Multi-Edit's VCS support consists of a set of Multi-Edit macros that acts as a front end to the more popular third-party version control systems.

The VCS support actually contains four different interfaces to the selected third-party VCS programs. This was done to provide convenience and to help increase your productivity. With these interfaces most, if not all, of your VCS work can be done without exiting Multi-Edit.

The first interface is essentially the same interface used to open and close files. When the VCS support is enabled, the file open and close functions have the ability to check files out from VCS archives when loading non-existing files, and to check files back into VCS archives when closing them or upon exiting Multi-Edit. For more detail on how these function, refer to Using the File Open and Close Interface in the chapter The Multi-Edit Interface under section Version Control.

The other three interfaces are all accessed through the VCS Menu or toolbar buttons; the most used being the Current File Menu/Toolbar Interface. This allows you to do most of your VCS operations using the file that is loaded into the current Editing Window.

The Directory of Archives Dialog and the Multi-Edit Files From Archives Dialog use dialogs that allow you to select the files for which you want the VCS operations to be active. These are powerful ways to check in and out files and perform other functions in an interface similar to Windows Explorer.

The last interface involves selecting VCS | Run VCS Interactively. This starts the User Interface that comes with your VCS program without exiting Multi-Edit. This would be used for features that you require that are not currently fully supported in the VCS support macros.

What Are Macros?

A “macro” is a way of automating tasks, particularly repetitive tasks. Multi-Edit uses two different kinds of macros. The first, known as Keystroke Macros, is simply a sequence of keystrokes that have been recorded and may be played back later. The second is much more advanced and is created using Multi-Edit's high-level CMac Macro Language. The Multi-Edit CMac Macro Language is a complete programming language, designed specifically for the automation of text manipulation tasks.

A Multi-Edit macro is a sequence of instructions that the user may save, retrieve, and execute repeatedly. Unlike a simple keystroke macro, which merely repeats a series of operations already performed by the user, the CMac macro language allows for conditional action, user interface and manipulation of a variety of data types, including strings of text, integers, real numbers, and structures.

CMac is a compiled programming language similar in syntax to C. CMac provides:

• If/else/else if, do/while, while, for, and switch constructs
• String, integer, character and floating point data types
• Local and Global variables
• String, integer, character, real, and void function types
• Parameter passing, with variable arguments and return values
• Preprocessing directives #ifdef, #ifndef, #else, #endif, #define, #undefine
• Complex, nested expression evaluation
• Full access to all Multi-Edit functions
• DLL Access
• Easy access to the screen, keyboard, mouse and hardware

The creation of a CMac macro is a relatively simple process: you create the source code in a Multi-Edit window and then select Tools | Execute Compiler. Once compiled, the macro becomes immediately available for your use. You can make changes to the macro, compile again, and the changes will instantly go into effect. If you make any syntactical errors while creating or modifying the macro, Multi-Edit will display the appropriate error message and take your cursor directly to the position where the error occurred.

The Macro menu contains tools for executing and debugging Multi-Edit macros. In addition, keystroke macros may be recorded and edited from this menu.

For additional help with the CMac Macro Language, select Help | CMac Language.

For an alternate explanation of Multi-Edit CMac see the Introduction to CMac series in the User Created Macros forum of the Multi-Edit web site (www.multieditsoftware.com/forums)

WebLair

WebLair encompasses all of Multi-Edit's web development technologies. This includes web browser interaction via WebLair's browser manager, Markup language tag highlighting and editing, Tag databases, and the configuration of helper applications.

Multi-Edit makes use of a tag database for markup language tags. This consists of a file containing tag information, such as browser compatibility and attribute names and types. The tag database file is identified by the extension .tdb and resides in the config subdirectory of the Multi-Edit install directory. The .tdb file(s) are created, deleted, or modified through the WebLair configuration dialog(s).