Closed JessicaKMcIntosh closed 9 years ago
Thanks for the suggestion, I just added the code you suggested and released it as version 3.7. Also, glad to hear you like the plug-in :-). Happy Vimming!
I think it's better to disable this highlighting until it will be fixed.
Because it highlights not only subroutines from your tags file, but also variable names and even Perl operators such as if
and etc, of course if you had sub if {}
in your tags file and as a result it brakes syntax highlighting.
Sorry for my creepy English (=
Try modifying the patter_prefix line to read as below. It will only match if the text is not preceded by 'sub' and is prefixed by either a '>' for methods, '&' for old style procedure calls and a space for modern procedure calls.
So the following would never match:
sub error
$error
%error
While the following will match:
SOMETHING->error
&error
error
Change:
\ 'pattern_prefix': '\%(\<sub\s\+\)\@<!\%(>\|\s\|&\)\@<=\<'})
If highlighting the name in a sub declaration doesn't matter to you (personal preference) then the it can be shortened to the following:
\ 'pattern_prefix': '\%(>\|\s\|&\)\@<=\<'})
@JessicaKMcIntosh, thank you. It helped me.
Just found that procedures at the beginning of the line were not highlighting. The following corrects that. I think this is all cases.
\ 'pattern_prefix': '\%(\<sub\s\+\)\@<!\%(>\|\s\|&\|^\)\@<=\<'})
@khrt: Thanks for reporting the issue!
@JessicaKMcIntosh: Thanks for the follow up, I've updated the Perl support as you suggested.
Happy Vimming!
I was missing Highlighting in Perl as other languages have. The following addition to "autoload/xolox/easytags.vim" will take care of this.
Thanks for the awesome work.