by Greg Kempe
www.kempe.net
welcome | about | features | screenshots | download | feedback

Feature List

> Version History

New in version 2.5

> ActiveX/COM Object support
> MUSH Code to Pretty Code
    formatting
> Meta Commands support
    with Text formatting
> Improved formatting reports
> ...A lot more

Detailed Features

> Meta Commands
> Clipboard & file support
> Bracket-match checking
> Trailing space checking
> Function & command checking
> Smart plurals
> Line count reports
> Text to MUSH Code formatting
> Literal strings

Basic Features

> Drop and Drop support
> Context-sensitive help
> Command-line support
> "Single instance" restriction

Features

Detailed below are all the features of MUSH Formatter. Click a link on the left for details on that feature.

Note: Almost all these features can be dis/enabled as you feel fit, both from within the program and via command-line options.

COM/ActiveX Object Support     (New in MUSH Formatter 2.5)

New COM/ActiveX objects make MUSH Formatter's functionality available to scripting environments like VBScript and Javascript, as well as to programming environments such as Delphi, C++ and Visual Basic.

This means you can embed formatting into your MUSHing program if it has scripting support. A very good client that does is MUSHClient.

MUSH Code to Pretty Code Formatting     (New in MUSH Formatter 2.5)

Now you can take regular MUSH code (such as that from an @examine) prettify it by puttting it through MUSH Formatter, making it far easier to read and maintain. This is the reverse of the normal Pretty Code to MUSH Code formatting style.

Meta Commands     (New in MUSH Formatter 2.0)

Extensive support for meta commands has been added to MUSH Formatter.

These commands, based on the pre-processor commands used by C-compilers, allow, among other things:

  • conditional formatting of code (#ifdef, #else, etc.)
  • definition of macros and constants (#define, #undefine)
  • inclusion of external files (#include)
  • setting of formatting options during formatting (#option)

Clipboard & File Support

You can choose to format text from either a file or the clipboard, as well as choose whether to output the formatted text to the clipboard, the input file or a new file. A default output filename can also be set, based on the input filename (using a template.)

Bracket-Match Checking

The formatter can check to see that any brackets you open are also closed (and vice versa) - but only within that specific code block. This means one wrong bracket doesn't affect the whole file.

Brackets that are checked are: [ ( { } ) ]

Trailing Space Checking

Warnings are shown when a line has more than one space at the end of it - useful if your text editor doesn't remove trailing spaces when saving.

This prevents lines that should be placed together from having spaces between them.

Function & Command Checking

All your function calls, and certain command calls, are checked for validity against a user-customisable list of valid commands and functions. No more searching your code for typos - it's done for you!

MUSH Formatter comes with a list of all the functions and @-commands included with TinyMUSH 2.2.3. You can easily modify both of these lists to suit your needs.

Smart Plurals

Functions of the form <function>(s) can be ignored - in other words lines like "5 item(s) found" won't result in the supposed function item being checked against the list of valid functions.

This is very useful if you use such a coding style. Otherwise you'd have to add each noun you use to the list of functions!

Line Count Reports

Numerous line reports can be appended to your formatted code, including:

  • The number of lines processed
  • The number of resulting lines
  • The number of comment lines stripped
  • The number of literal lines that were processed as text

Text Formatting

ASCII images like the one below can be formatted into a MUSH-friendly version (since the game converts multiple spaces to one space, etc.) The process is highly customisable and code can be easily embedded into the text (see below)

               ..::''''::..
             .;''        ``;.
            ::    ::  ::    ::
           ::     ::  ::     ::
           :: .:' ::  :: `:. ::
           ::  :          :  ::
            :: `:.      .:' ::
             `;..``::::''..;'
               ``::,,,,::''
MUSH-friendly version (cut-and-paste it your game and see!):

@emit [space(6)]..::''''::..%r %b %b.;''[space(8)]``;.%r %b :: %b %b:: %b:: %b %b::%r %b::[space(5)]:: %b::[space(5)]::%r %b:: .:' :: %b:: `:. ::%r %b:: %b:[space(10)]: %b::%r %b :: `:.[space(6)].:' ::%r %b %b`;..``::::''..;'%r[space(6)]``::,,,,::''%r

Literal Strings

You can embed ascii text into your code "as is" and have it converted as above simply by placing a " character at the beginning of the line.

This means you don't have to worry about formatting your help entries any more: just type them in how you want to see them and let 'er rip!

Eg:

  &foo me=
    $foo:
      @pemit %#=
  # -- literal string follows
  "   .o.o.o.  This is formatted just like the
  "  ()     () smiling face in the above section
  "            It even escapes the brackets!
  -
  
The formatted result is:

&foo me=$foo:@pemit %#= %b .o.o.o. %bThis is formatted just like the%r %b\(\)[space(5)]\(\) smiling face in the above section%r[space(12)]It even escapes the brackets!%r


© Greg Kempe, 1998-2001