Text::VimColor 0.11 review

Download
by rbytes.net on

Text::VimColor is a syntax color text in HTML or XML using Vim. SYNOPSIS use Text::VimColor; my $syntax = Text::VimColor

License: Perl Artistic License
File size: 19K
Developer: Geoff Richards
0 stars award from rbytes.net

Text::VimColor is a syntax color text in HTML or XML using Vim.

SYNOPSIS

use Text::VimColor;
my $syntax = Text::VimColor->new(
file => $0,
filetype => 'perl',
);

print $syntax->html;
print $syntax->xml;

This module tries to markup text files according to their syntax. It can be used to produce web pages with pretty-printed colourful source code samples. It can produce output in the following formats:

HTML

Valid XHTML 1.0, with the exact colouring and style left to a CSS stylesheet

XML

Pieces of text are marked with XML elements in a simple vocabulary, which can be converted to other formats, for example, using XSLT

Perl array

A simple Perl data structure, so that Perl code can be used to turn it into whatever is needed

This module works by running the Vim text editor and getting it to apply its excellent syntax highlighting (aka 'font-locking') to an input file, and mark pieces of text according to whether it thinks they are comments, keywords, strings, etc. The Perl code then reads back this markup and converts it to the desired output format.

This is an object-oriented module. To use it, create an object with the new function (as shown above in the SYNOPSIS) and then call methods to get the markup out.

Requirements:
Perl

Text::VimColor 0.11 search tags