jEdit Community home jEdit Community Wiki > TWiki > BeautifierPlugin jEdit Community Wiki webs:
Main | Plugins | Know | TWiki | Sandbox
TWiki . { Welcome? | Register? | Changes | Topics | Index | Search | Go }

BeautifierPlugin

This plugin allows you to have code fragments automatically formatted and highlighted. It depends on the Beautifier library written by Mike Jewell.

Syntax Rules

Language Syntax
Bean Shell %CODE{"BeanShell"}% ... %ENDCODE%
C++ %CODE{"cpp"}% ... %ENDCODE%
C# %CODE{"csharp"}% ... %ENDCODE%
Java %CODE{"java"}% ... %ENDCODE%
Lua %CODE{"lua"}% ... %ENDCODE%
Makefile %CODE{"makefile"}% ... %ENDCODE%
Perl %CODE{"perl"}% ... %ENDCODE%
PL/SQL %CODE{"plsql"}% ... %ENDCODE%
Python %CODE{"python"}% ... %ENDCODE%
PHP3 %CODE{"php3"}% ... %ENDCODE%
Scheme %CODE{"scheme"}% ... %ENDCODE%
TCL %CODE{"tcl"}% ... %ENDCODE%
XML %CODE{"xml"}% ... %ENDCODE%

Additional languages can be added since the Beautifier library is flexible and can support a wide range of language families. Other languages can be added with relative easy by downloading the full PHP dist from http://www.beautifier.org and converting the relevant language file from PHP to Perl.

Examples

%CODE{"cpp"}%
   void foo() {
     print("Do stuff.\n");
   }
%ENDCODE%

BeautifierPlugin Global Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %INTERWIKIPLUGIN_SHORTDESCRIPTION%

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

div.fragment{
        background : #FFFFCC;
        border : 1px solid #CCCCCC;
        margin-left : 2em;
        margin-right : 2em;
        padding : 4px;
}

#include <nworld.h>

/**
@brief Advance the simulation by one timeslice.
*/
void nWorld::StepSim()
{
    // Iterate simulation loop
    for (node = entityList.GetHead(); node != NULL; node = node->GetSucc())
    {
        entity = (nEntity*)node->GetPtr();
        entity->Trigger(this, this->stepSize);
    }
}

Bugs

History

Date Change Name
26 Jul 2003 Syntax fixes from TWiki:Main/WillNorris TWiki:Main/LingLo
10 Feb 2003 Syntax fix from TWiki:Main/JoshMore TWiki:Main/LingLo
28 Dec 2002 Accepts mixed case language names TWiki:Main/LingLo
20 Dec 2002 Changed syntax to allow for simpler addition of new languages TWiki:Main/LingLo
16 Oct 2002 Added nebula nodes and links to Python scripts, but it doesn't work since the node names are usually in strings TWiki:Main/LeafGarland
30 Jul 2002 Added nebula nodes and links to Tcl scripts TWiki:Main/LeafGarland
30 Jul 2002 Changed Beautifier::Core to use 'linkscripts' TWiki:Main/LeafGarland
28 Jul 2002 Created TWiki:Main/LingLo

Plugin Info

Plugin Author: TWiki:Main/LingLo
Plugin Version: 26 Jul 2003 (V1.14)
CPAN Dependencies: none
Other Dependencies: Beautifier (supplied)
Perl Version: 5.005
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/BeautifierPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/BeautifierPluginDev

Related Topics: TWiki Preferences, TWiki Plugins

-- Ling Lo? - 18 Dec 2002

Topic BeautifierPlugin . { Edit | Attach | Ref-By | Printable | Diffs | r1.12 | > | r1.11 | > | r1.10 | More }
Revision r1.12 - 23 Sep 2003 - 00:43 GMT - Brad Mace Copyright © 1999-2011 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding jEdit Community Wiki? Send feedback.
Get jEdit at !SourceForge.net. Fast, secure and Free Open Source software downloads