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

[CLOSED] Line Comment should delegate to Block Comment in block-only languages like CSS #2045

Open
core-ai-bot opened this issue Aug 29, 2021 · 3 comments

Comments

@core-ai-bot
Copy link
Member

Issue by peterflynn
Thursday Nov 15, 2012 at 01:57 GMT
Originally opened as adobe/brackets#2119


  1. Open a CSS file
  2. Press Ctrl+/

Result: nothing happens

Expected: fall back to block comments when line comments are unavailable

There's a twist, though: in some editors (like Sublime), the block comment behavior is subtly different when invoked as a fallback like this. When there's no selection, the entire line is wrapped in a block comment (the normal behavior, and what you get if you invoke block comment explicitly, is to insert an empty block comment at the cursor position).

@core-ai-bot
Copy link
Member Author

Comment by TomMalbran
Thursday Nov 15, 2012 at 06:45 GMT


This is what i was planning to implement next, but wasn't sure if it should just make a block comment over the selection, or over all the lines in the selection. Maybe this second approach might work better on HTML, where commenting a block over several lines that don't include the complete lines is not usual.

In any case, it should be easy enough, by adding an additional parameter to block-comment with the positions for the prefix and suffix in the case of a block-comment.

@core-ai-bot
Copy link
Member Author

Comment by pthiess
Thursday Nov 15, 2012 at 17:53 GMT


This is a very nice ECR, I assign@peterflynn just because we can't assign to Tom directly.

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Friday Dec 14, 2012 at 03:05 GMT


This is solid! I wrote some unit tests to cover this too, which I'll put up a pull request for as soon as #2342 is ironed out.

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

1 participant