Epsilon User's Manual and Reference >
Commands by Topic >
Language Modes >
Perl Mode
Epsilon automatically enters Perl
mode when you read a file with an extension of .perl, .pm, .al, .ph,
or .pl (or when you read a file with no extension that starts with a
#! line mentioning Perl). The compile-buffer command
uses the compile-perl-cmd variable in this mode.
Epsilon's syntax highlighting uses the perl-comment color
for comments and POD documentation, the perl-function color
for function names, and the perl-variable color for variable
names.
Epsilon uses the perl-constant color for numbers, labels,
the simple argument of an angle operator such as <INPUT> , names
of imported packages, buffer text after __END__ or __DATA__ ,
here documents, format specifications (apart from any variables and
comments within), and the operators my and local .
A here document can indicate that its contents should be syntax
highlighted in a different language, by specifying a terminating
string with an extension. At the moment the extensions .tex and .html
are recognized. So for example a here document that begins with
<<"end.html" will be colored as HTML.
Epsilon uses the perl-string color for string literals of
all types (including regular expression arguments to s/// , for
instance). Interpolated variables and comments are colored
appropriately whenever the string's context permits interpolation.
Epsilon uses the perl-keyword color for selected Perl
operators (mostly those involved in flow control, like foreach or
goto, or with special syntax rules, like tr or format), and modifiers
like /x after regular expressions.
Perl mode's automatic indentation features use a modified version of
C mode. See C Mode for information on customizing
indentation. Perl uses a different set of customization variables
whose names all start with perl- instead of c- but work the
same as their C mode cousins. These include
perl-align-contin-lines, perl-brace-offset,
perl-closeback, perl-contin-offset,
perl-label-indent, perl-top-braces,
perl-top-contin, perl-top-struct, and
perl-topindent. Set perl-tab-override if you want
Epsilon to assume that tab characters in Perl files aren't always 8
characters wide. Set perl-indent if you want to use an
indentation in Perl files that's not equal to one tab stop.
When the cursor is on a brace, bracket, or parenthesis, Epsilon will
try to locate its matching brace, bracket, or parenthesis, and
highlight them both. If the current character has no match, Epsilon
will not highlight it. Set the variable
auto-show-perl-delimiters to zero to disable this feature.
When you yank blocks of text into a buffer in Perl mode, Epsilon can
automatically reindent it. Set the variable
reindent-after-perl-yank nonzero to enable this behavior.
Some Perl syntax is sensitive to indentation, and Epsilon's indenter
may change the indentation, so you should examine yanked text to make
sure it hasn't changed.
Press Alt-' to display a list of all subroutines defined in the
current file. You can move to a definition in the list and press
<Enter> and Epsilon will go to that definition, or press Ctrl-G
to remain at the starting point.
Standard bindings:
Copyright (C) 1984, 2020 by Lugaru Software Ltd. All rights reserved.
|