Ever wonder how much of our programming style is dictated by our desire to see the right pretty colors? In Perl, I think it's a good bit.
For example, I know that the person who wrote this line wasn't using Vim's default Perl syntax:
Account->q(accountid => $self->{accountid});
...because it would interpret q(...) as a non-interpolative string. Meanwhile, the guy who wrote this was:
$logger->("setting account information to \%info");
...because syntax highlighting told him that %info was a variable, even though Perl doesn't interpolate hashes.
I always put spaces around my range operators, because otherwise in 1..2 the dots are different colors.
Other examples welcome.
I'm Guilty (Score:2)
#!# A very important comment that want everyone to noticeRe: (Score:1)
I am color weak so that is hard for me to tell so I just use # XXX to have something stand out.
Re: (Score:2)
# BUG (Score:2)
Re: (Score:1)
Hey that can be handy...why not send the diff the the perl.vim maintainer?
Re: (Score:2)
q/qq vs. quotes (Score:1)
VS. this:
YAML and emacs (Score:1)
Re: (Score:1)
Try the real YAML mode instead of the one based on generic.
http://www.emacswiki.org/cgi-bin/wiki/YamlMode [emacswiki.org]
Re: (Score:1)
Another Vim-Cripple (Score:1)
I've thought about this a lot. For a long time, I avoided chained method calls, like:
$foo->bar->baz(123, "abc");
or:
$foo->{bar}->baz(123);
because only the first method was highlighted as such. Some day I discovered perl-mauke.vim [1] which made lots of things better. However, there are still some things I avoid because of Vim. However, that's probably just me. I also avoid modules with names that are not correctly camel-cased (in my understanding), or methods that start with an uppercase letter.
fat commas (Score:1)
A huge pain in the ass for me is that literal barewords for fat commas are falsely shown as keywords.
foo( reset => 1 );
Another big one, for me at least, is that all POD blocks should start with =pod, otherwise the relatively simple comment checker in Ultraedit can't handle it.
Re: (Score:2)
and you'll see that bar is treated like quoted text.