borela / naomi

Sublime Text enhanced syntax highlighting for JavaScript ES6/ES7/ES2015/ES2016/ES2017+, Babel, FlowType, React JSX, Styled Components, HTML5, SCSS3, PHP 7, phpDoc, PHPUnit, MQL4. Basic: Git config files.
Other
557 stars 20 forks source link

Improve JavaScript line comments - ignore empty lines #237

Open dndrsn opened 4 years ago

dndrsn commented 4 years ago

When commenting out multiple lines with line comments (cmd + /), empty lines in the selection will get comments and the space on those lines will affect the indent level of the comments. For example this...

image image

If the line in the middle has whitespace the indent of the comments is better...

image image

Ideally, the whitespace only lines would be completely ignored and no comments would be added to the empty lines at all. It appears to be an issue with the core Sublime JS syntax. Other syntaxes like C# don't have this issue. If the syntax is changed to C#...

image image

Which, to me, is ideal. Would be great to fix this behavior if possible.