vim-operator-highlight icon indicating copy to clipboard operation
vim-operator-highlight copied to clipboard

[Perl]: Wrong syntax highlighting

Open phongvcao opened this issue 9 years ago • 0 comments

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.

phongvcao avatar Mar 25 '15 00:03 phongvcao