[ 
https://issues.apache.org/jira/browse/NETBEANS-436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16382255#comment-16382255
 ] 

Christian Lenz commented on NETBEANS-436:
-----------------------------------------

So this works for scss/css and html, because it will wrap around with CSS: 
/*whatever*/ and HTML: <!--<div>-->. It would be better to add spaces after /* 
and before */ and between <!-- <div> -->.

> Please change behaviour of commenting lines
> -------------------------------------------
>
>                 Key: NETBEANS-436
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-436
>             Project: NetBeans
>          Issue Type: Improvement
>          Components: editor - Formatting &amp; Indentation, editor - Other
>    Affects Versions: Next
>            Reporter: Christian Lenz
>            Priority: Major
>
> Atm, if you hit a shortcut to comment a like, it will end up this:
> {code}
> if(whatever) {
>    if(again) {
>       console.log(42);
> //    System.out.println(42);
>    }
> }
> {code}
> I know it is not the same lang but it doesn't matter. As you can see, it will 
> comment the line, but it will start the comments still on column 1 and not 
> where the code is. This is a pain in the ass, because if you reformat the 
> code, it looks like this:
> {code}
> if(whatever) {
>    if(again) {
>       console.log(42);
>       //    System.out.println(42);
>    }
> }
> {code}
> and if you uncomment the line, it looks like this:
> {code}
> if(whatever) {
>    if(again) {
>       console.log(42);
>           System.out.println(42);
>    }
> }
> {code}
> and you have to reformat it again or move it into the right direction. I know 
> that it was easy to add the comments in column 1 but no editor or IDE does 
> this. In VS Code and the JetBrains family it looks like this:
> {code}
> if(whatever) {
>    if(again) {
>       console.log(42);
>       // System.out.println(42);
>    }
> }
> {code}
> Which is more right, it only adds "// " in front of the code and removes it 
> again. So in my opinion this is way better and even correct. It keeps the 
> indentation too so no need to worry after you reformat the code.
> Cheers
> Chris



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to