vim-operator-highlight
vim-operator-highlight copied to clipboard
[Perl]: Wrong syntax highlighting
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:
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.