]> sipb.mit.edu Git - ikiwiki.git/blob - doc/plugins/contrib/syntax.mdwn
54e784e0c952b26379d261e9ef3bc616596c59c9
[ikiwiki.git] / doc / plugins / contrib / syntax.mdwn
1 [[template id=plugin name=syntax author="[[VictorMoral]]"]]
2 [[tag type/chrome type/slow]]
3 [[meta title="syntax (third-party plugin)"]]
4
5 `syntax` is a plugin that add support to ikiwiki for syntax highlighting through the *vim* editor and its perl interface [[cpan Text::VimColor]], so it depends on a vim functional installation.
6
7 The plugin inserts a fragment of HTML with special marks from a file or a string text. It accepts the following parameters:
8
9 * **type** (optional): this is the file type for vim syntax highlighthing. It can be omitted if the param *file* exists.
10 * **file**: Path to the source file. It must exist on every rebuild of the wiki.
11 * **text**: Text string with the source.
12 * **description** (optional): little description about the content.
13
14 The params *file* and *text* are mutually exclusive.
15
16 Example:
17
18        \[[syntax type="perl" text="""  
19        #!/usr/bin/perl
20
21        my $a = "World";
22        print "Hello, ${a}\n";
23        """]]
24
25 or 
26
27        \[[syntax file="hello.pl" description="My first perl program"]]
28
29 It can be downloaded from [here](http://taquiones.net/files/misc/Ikiwiki-Plugin-syntax-0.5.tar.gz) or through my personal debian repository at <http://taquiones.net/files/debian/>.
30
31 Any help, comments or critics are welcome at <victor@taquiones.net>.
32