sponsor Vim development Vim logo go to HTTPS page Vim Book Ad

perl-mauke.vim : improved perl syntax highlighting

 script karma  Rating 225/93, Downloaded by 5280    Comments, bugs, improvements  Vim wiki

created by
Lukas Mai
script type
This file is based on the perl.vim syntax definition that comes with vim, but with some heavy modifications intended to improve vim's perl highlighting.

The list of changes includes:
* 'new' and 'croak' are not keywords and no longer highlighted as such
* Special highlighting for pragmas (e.g. "use warnings") now applies to all pragmas coming with perl
* Fixed number highlighting ("0X" is not a valid hex prefix, "L" is not a valid suffix)
* Fixed escape sequence highlighting ("\X123" is not a hex escape, "\123" is limited to three octal digits)
* Lots of improvements in the matching of quoted constructs:
  - vim no longer thinks "!" is a quoting operator (so "!!" works right)
  - support for arbitrary quoting delimiters (e.g. "m%...%" works)
  - I've also tried to make nesting work (e.g. "s[foo[bar]][b[a]z]g")
* Full support for subroutine definitions (parsing of prototypes and attributes)
* Recognizes v-strings and statement labels
* "=>" quotes its LHS, even if it's a keyword
* Perl 5.10 support: new keywords ('given', 'when', 'default', 'state', 'break') and regexp control operators ('PRUNE', 'SKIP', 'COMMIT', etc.)
install details
Copy perl.vim into ~/.vim/syntax/ and vim will find it before the "standard" perl syntax file that comes with vim.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
perl.vim 0.11 2008-08-07 6.0 Lukas Mai * fold "given" blocks
* highlight \012 as octal escape in regexes
* fix "$foo:bar" highlighting if 'iskeyword' contains ":"
* switch scope_in_variables and extended_vars on by default
perl.vim 0.10 2008-07-15 6.0 Lukas Mai Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo