Tk::TextHighlight::Perl - a Plugin for Perl syntax highlighting
Tk::TextHighlight::Kate inherits Syntax::Highlight::Engine::Kate;
use Tk; require Tk::TextHighlight; my $m = new MainWindow; my $e = $m->Scrolled("TextHighlight", -syntax => "Kate::Perl", #SPECIFY "Kate::" AND THE LANGUAGE OF CHOICE. -scrollbars => "se", -background => "black", )->pack(-expand => 1, -fill => "both"); #OPTIONALLY ADD KATE'S LANGUAGE LIST TO THE "Syntax.View" RIGHT-BUTTON MENU: my ($sections, $extensions) = $e->fetchKateInfo; $e->addKate2ViewMenu($sections); $m->MainLoop;
For its limitations see also there. This module provides extra methods to provide syntax highlighting for the Perl programming language.
returns a list of string snippets and tags that can be inserted in a Tk::Text like widget instantly.
sets and returns a reference to a list of tagnames and options. By default it is set to:
[ ['Alert', -foreground => 'blue'], ['BaseN', -foreground => '#007f00'], ['BString', -foreground => '#c9a7ff'], ['Char', -foreground => 'green'], ['Comment', -foreground => 'lightblue'], ['DataType', -foreground => 'blue'], ['DecVal', -foreground => 'yellow'], ['Error', -foreground => '#ff0000'], ['Float', -foreground => 'yellow'], ['Function', -foreground => 'darkred'], ['IString', -foreground => 'yellow'], ['Keyword', -foreground => 'darkgreen'], ['Normal', -foreground => 'black'], ['Operator', -foreground => 'black'], #NEEDS 2B SAME AS NORMAL SO " -opt => 'str'" looks right! ['Others', -foreground => '#b03060'], ['RegionMarker', -foreground => '#96b9ff'], ['Reserved', -foreground => 'darkred'], ['String', -foreground => 'green'], ['Variable', -foreground => 'blue'], ['Warning', -foreground => 'yellow'], ]
Used internally. Don't call it yourself.
Compares @state to the current state of the formatter. returns true when equal.
Returns a list of the current state of the formatter. Called by the highlighting routines in Tk::TextHighlight.
Sets the state of the formatter. Called by the highlighting routines in Tk::TextHighlight.
Original CodeText Author: Hans Jeuken (haje@toneel.demon.nl)
TextHighlight Author: Jim Turner (turnerjw784@mesh.net)
Probably plenty
To install Tk::TextHighlight, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tk::TextHighlight
CPAN shell
perl -MCPAN -e shell install Tk::TextHighlight
For more information on module installation, please visit the detailed CPAN module installation guide.