You are not logged in.

#1 2010-10-01 19:44:24

gauthma
Member
Registered: 2010-02-16
Posts: 218
Website

Vim, Perl and syntax highlight

Hello all,

Suppose you have a little snippet of Perl code like such:

sub foo # some comment with keywords for die and or not
{
  print "In sub foo!\n";
}

The comment in the sub line is not treated (i.e. highlighted) as a comment. Rather, it is highlighted as regular source code. Seems like a bug, but before reporting it to the maintainer, I wanted to see if anyone else shared the same issue.

To clarify: this refers only to highlight in vim, running the code works as expected. And I took care to see if this could be the results of my settings: the problem seems in fact, to be with the perl.vim file (in my system: /usr/share/vim/vim73/syntax/perl.vim).

So, can anyone reproduce this behaviour?

Offline

#2 2010-10-01 21:49:42

frabjous
Member
Registered: 2010-07-13
Posts: 367

Re: Vim, Perl and syntax highlight

Yes, same for me. (I don't write perl, so I don't have anything special installed for it other than the default /usr/share/vim73/syntax/perl.vim.)

Last edited by frabjous (2010-10-01 21:50:00)

Offline

#3 2010-10-01 21:51:45

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Vim, Perl and syntax highlight

Is it a valid comment in perl?

Offline

#4 2010-10-01 22:13:49

gauthma
Member
Registered: 2010-02-16
Posts: 218
Website

Re: Vim, Perl and syntax highlight

karol wrote:

Is it a valid comment in perl?

I've done it countless times, and never got any warnings or errors because of it, so I assume it is valid.

Offline

#5 2010-10-01 22:15:00

gauthma
Member
Registered: 2010-02-16
Posts: 218
Website

Re: Vim, Perl and syntax highlight

frabjous wrote:

Yes, same for me. (I don't write perl, so I don't have anything special installed for it other than the default /usr/share/vim73/syntax/perl.vim.)

Hum, ok. I'll report it to the maintainer then.

Offline

Board footer

Powered by FluxBB