-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Auto comment continuation also happens with shebangs #12423
Comments
you can or if u want a mapping |
Really like your idea to have a keymap for adding newline without continuing the comment. See linked PR above ^^ |
I feel like even some sort of naive detection would work, something like: if the comment character is "#", the first character following the start character is a "!", and the cursor is on the first line of the file - don't continue the "comment". |
You can also just press |
Hm... I don't really see it as a trivial problem which can be fixed unless we apply this check only to bash. |
I remember seeing somewhere in the codebase a |
Ah, I found it, const SHEBANG: &str = r"#!\s*(?:\S*[/\\](?:env\s+(?:\-\S+\s+)*)?)?([^\s\.\d]+)"; When we continue line comments, perhaps we could
|
Let me try to create a PR for this then |
When writing stuff like a shell script, you usually write a shebang at the start.
The shebang, however, looks like a comment in many shell languages because they use # as comment syntax.
Also, maybe adding a way to not extend the comment (idk... shift-enter?) would be cool :)
Thanks!
The text was updated successfully, but these errors were encountered: