Skip to content
This repository was archived by the owner on May 22, 2026. It is now read-only.
This repository was archived by the owner on May 22, 2026. It is now read-only.

[Perl]: Wrong syntax highlighting #9

Description

@phongvcao

I was trying to code some small Perl script today and found out that the syntax highlighting for Perl went wrong whenever I enabled vim-operator-highlight for 'perl' filetype:

selection_001

So basically the wrong syntax highlighting is caused by the (-M $file) and (-s $file) operators which return the $fileAge and $fileSize of the $file, respectively. After commenting out the 2 lines:

my $fileAge = -M $file;
my $fileSize = -s $file;

then Perl syntax highlighting was working again.

Also, as you can see above, the "{" character in the "sub main { ... }" block is not highlighted in "green" as I set in my vimrc.

Here is the vim-operator-highlight configuration in my vimrc:

let g:ophigh_highlight_link_group = "Statement"
let g:ophigh_filetypes_to_ignore = {
            \ 'nerdtree' : 1, 'git' : 1, 'gundo' : 1, 'gitv' : 1, 'unite' : 1 }

I hope this issue would be fixed soon since this plugin is very useful for me when coding with Perl and the 2 Perl operators above are very common in Perl scripts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions