Open lunacodes opened 8 years ago
Would it be more helpful to add conditions for CSS files to this functionality, or do what you're proposing and just limit the functionality to only HTML based comments?
I think the first is more helpful - it frees up the Ctrl+Shift+/
for use in other plugins. But Also - implementing this in CSS is useful too!! it would be great to see both
(Side Note: Sublime Text currently executes multi-line comments using the single line comment tag (example: in C every line will have // instead of having a block with /* */). I'm planning to write a plugin that will allow for using multiline comments syntax in any language via Ctrl+Shift+/
& either way, it would be great to see the functionality for NestHTMLComments be HTML/CSS specific :smile_cat:)
(Edited the above post to fix some inaccuracies)
I hesitate since there hasn't been any complaints or requests for such a change. I'd be more interested in a simple way to detect the current open file syntax and only apply the comment effect if the file type meets a certain criteria (html, php etc.).
maybe this https://github.com/jfcherng/Sublime-AutoSetSyntax/blob/master/AutoSetSyntax.py could help ?
@philsinatra - that sounds great, and I think you've got the right gyst/separation of concerns!
HTML-Nest-Comments currently affects files of any syntax, instead of just html/php. This is an issue, since Sublime Text 3 does not handle nested comments in CSS properly. Currently this plugin prevents implementing a similar function for nested comments in CSS.
This is due to the
else
statement on line 16 in HTMLNestComments.py, which simply needs to be changed toelif
I'd be happy to submit a pull request with the change.