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

Prevent from extending # comments if current line is a shebang #274

Open
audreyseo opened this issue Jun 21, 2017 · 1 comment
Open

Prevent from extending # comments if current line is a shebang #274

audreyseo opened this issue Jun 21, 2017 · 1 comment

Comments

@audreyseo
Copy link
Contributor

If my cursor is on the same line as a shebang like below:

#!/bin/bash<cursor is here>

# Code below...

Then pressing enter will result in this:

#!/bin/bash
#!/<cursor is here>

# Code below...
@audreyseo audreyseo changed the title Prevent from extending # comments if on a shebang Prevent from extending # comments if current line is a shebang Jun 21, 2017
@MoritzKn
Copy link
Collaborator

Thanks for reporting I really appreciate your contributions.
This is the immediate result of #225. The reason for this change was that some languages and tools use a character after the comment prefix to denote different types of comments. For example Rust differentiates between //, /// and //!. For shebangs that indeed makes no sense. Feel free to add an exception and submit another PR 😃.

I think for shebangs we could even add no comment at all.

The relevant code for this is at:

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

No branches or pull requests

2 participants