cperl-mode
cperl-mode copied to clipboard
Extra space in keyword expansion
With cperl-electric-keywords set, when typing if + space I get an expanded construct like this (_ is point):
if ( _) {
}
- Is this intended behaviour?
- If so, is there a setting or some other way to get rid of the extra space before point?
I think the behavior is intended. Note that according to perlstyle spaces after the opening parenthesis is recommended for readability. For example if I run perltidy on this code:
if($foo==3) {
say "Hello";
}
it will insert extra spaces like this:
if ( $foo == 3 ) {
say "Hello";
}
Yes, but timtowtdi =). That's why perltidy has an option like --paren-tightness. I would personally write it like this:
if ($foo == 3) {
say "Hello";
}
I don't think someone will fix this, and tend to close the issue unless someone objects.