3 ms·
I have written a good amount of perl in both Vim and Emacs and can't recall noticing bad syntax highlighting in either. Do you have an example?
by thebelal 12y ago
I have written a good amount of perl in both Vim and Emacs and can't recall noticing bad syntax highlighting in either. Do you have an example?
- __david__ 12y agoI find Emacs's default Perl mode isn't so good. Luckily Emacs also comes bundled with cperl, which works much better in my experience. So much so that I have this in my .emacs: (defalias 'perl-mode 'cperl-mode) ; perl-mode sucks; use cperl-mode
- pyre 12y agoOne of the examples I seem to remember was string interpolation of things like: " @{[ blah() ]} " I was never an Emacs user, but paired with Emacs users quite often during a 4 year stint at a Perl shop. In Vim: my $variable = <<EOF; STUFF GOES HERE EOF Vim highlights everything from "<<EOF" to "EOF" as a string, but technically the string highlighting shouldn't start until the beginning of the next line. In the example above it's not the end of the world, but you can have examples like this: my $variable = function_call(<<EOF, $blah); EOF where ", $blah);" is highlighted as part of the string, when it isn't. [edit: I tried to replicated this, and I'm not seeing the HEREDOC portion highlighted as a string, but I also notice that Perl 5.20 has removed <<HEREDOC in favour of <<"HEREDOC" or <<'HEREDOC', so maybe that made parsing for syntax-highlighting easier.] Also in Vim: "text @{[ callFunction(sub { }) ]} text" The first '}' encountered terminates the '@{' instead of parsing matching pairs.