-
Notifications
You must be signed in to change notification settings - Fork 0
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] Add Toggle Comment support for several more languages #2875
Comments
Comment by TomMalbran
|
Comment by TomMalbran
Block uncomment will just remove the first "--" if those are at the start of the string (without considering spaces). The problem is for the same reason line and block comments for CoffeScript don't work, the line comment is the prefix of the block comment prefix. There is also another problem. Line uncomment on a block comment that covers the entire line will just remove the first "--" leaving an invalid string. The same thing will happen in CoffeScript. This is not as bad, but maybe line comment should check with the block prefix too and do nothing if it finds it at the start of any line, or at least go to comment mode, instead of uncomment. |
Comment by miketheman
Thanks! |
Comment by TomMalbran
|
Comment by TomMalbran I guess I could also fix that in this one and merge it |
Comment by miketheman
|
Comment by ahuth
As you observed, though, these are almost never used. It's probably safe to leave them out. |
Comment by TomMalbran Wasn't able to merge with master because of some issues with the submodules, so I did a manual merge: adobe/brackets@3a12c21. (I hope that is ok) I haven't added the comments for CoffeeScript and Lua, since those don't work well yet. But I will add them when I redo the comments fix. |
Issue by peterflynn
Thursday Mar 07, 2013 at 00:12 GMT
Originally opened as adobe/brackets#3056
Toggle Line and/or Block Comment support for: Java, CoffeeScript, Perl, Ruby, Python, SASS, Lua, Markdown, YAML, Haxe. All these languages were included in core already.
I hit a few snags while working on this:
###
, but Toggle Block Comment behaves badly (I think because the open/close delimiters are identical). So I've only included lineComment for now. Filed [CLOSED] Active line highlight doesn't disappear in unfocused editor #3057 on this.=begin
and=end
but couldn't find any real-world code that uses this (and I'm not clear what the "rules" are -- e.g. do those delimiters have to be alone on a line?). So I only included lineComment for now.;
and;;
equally. We'd probably want uncomment to fully strip either flavor, which we don't support yet. But Clojure being functional, toggling line comments also seems very rare -- toggling block comments might be useful, except it seems Clojure doesn't offer block comments. So I've left Clojure out for now.peterflynn included the following code: https://github.com/adobe/brackets/pull/3056/commits
The text was updated successfully, but these errors were encountered: