Lugaru's Epsilon
Programmer's
Editor 14.06

Context:
Epsilon User's Manual and Reference
   Commands by Topic
      . . .
      Changing Text
         Inserting and Deleting
         Killing Text
         Clipboard Access
         . . .
         Hex Mode
      Language Modes
         . . .
         Makefile Mode
         NSIS Mode
         Perl Mode
         PHP Mode
         PostScript Mode
         . . .
      More Programming Features
         Navigating in Source Code
         Pulling Words
         Accessing Help
         Context-Sensitive Help
         Commenting Commands
      . . .

Previous   Up    Next
NSIS Mode  Commands by Topic   PHP Mode


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 includes a perldoc command that you can use to read Perl documentation. It runs the command of the same name and displays the result in a buffer. You can double-click on a reference to another perldoc page, or press <Enter> to follow a reference at point, or press m to be prompted for another perldoc topic name.

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 also tries to auto-detect when a here document contains HTML. See the perl-heredoc-syntax variable.

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. Set reindent-perl-comments to keep indent-region from reindenting comments.

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. See the variable reindent-after-perl-yank 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.

If you run Perl's debugger inside Epsilon's process buffer under Windows, the following environment variable settings are recommended:

set PERLDB_OPTS=ReadLine=0 ornaments=''
set EMACS=yes

Standard bindings:

    perl-mode
   perldoc
 



Previous   Up    Next
NSIS Mode  Commands by Topic   PHP Mode


Lugaru Epsilon Programmer's Editor 14.06 manual. Copyright (C) 1984, 2024 by Lugaru Software Ltd. All rights reserved.