Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra space in keyword expansion #33

Open
r39ex opened this issue May 27, 2016 · 3 comments
Open

Extra space in keyword expansion #33

r39ex opened this issue May 27, 2016 · 3 comments

Comments

@r39ex
Copy link

r39ex commented May 27, 2016

With cperl-electric-keywords set, when typing if + space I get an expanded construct like this (_ is point):

if ( _) {
}
  1. Is this intended behaviour?
  2. If so, is there a setting or some other way to get rid of the extra space before point?
@hakonhagland
Copy link
Contributor

hakonhagland commented May 27, 2016

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";
}

@r39ex
Copy link
Author

r39ex commented May 27, 2016

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";
}

@renormalist
Copy link
Collaborator

I don't think someone will fix this, and tend to close the issue unless someone objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants