You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Christian Lenz (JIRA)" <ji...@apache.org> on 2018/11/14 16:14:00 UTC

[jira] [Comment Edited] (NETBEANS-1683) Move code up/down should reindent the code inside and outside blocks

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

Christian Lenz edited comment on NETBEANS-1683 at 11/14/18 4:13 PM:
--------------------------------------------------------------------

And if I move code from an inside block, to an outside block, it should reindent the code too. I could handled it by my own, after I created a macro, which will move up+reindent and same for move down+reindent. I tweeted about it, but it was more hacky and a workaround and had other problems. So this request is to implement such behaviour correctly for each supported language.


was (Author: chrizzly):
And if I move code from an inside block, to an outside block, it should reindent the code too. I could handled it by my own, after I created a macro, which will move up+reindent and same for move down+reindent. I tweeted about it, but it was more hacky and a workaround and had other problems. So this request is to implement such behaviour correctly for each language.

> Move code up/down should reindent the code inside and outside blocks
> --------------------------------------------------------------------
>
>                 Key: NETBEANS-1683
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-1683
>             Project: NetBeans
>          Issue Type: Improvement
>          Components: editor - Formatting &amp; Indentation
>    Affects Versions: Next
>            Reporter: Christian Lenz
>            Priority: Major
>
> I hope that I don't need to create for each language a new ticket, please let me know that. If you move code up or down, from outside of a function or outside of an if block or other blocks, it should reindent the code.
> {code:javascript}
> function test() {
>     if(true) {
>         
>     }
>     ^
>     |
>     console.log("test");
> }
> {code}
> expected behaviour:
> {code:javascript}
> function test() {
>     if(true) {
>         console.log("test");
>     }
> }
> {code}
> Current behaviour:
> {code:javascript}
> function test() {
>     if(true) {
>     console.log("test");
>     }
> }
> {code}
> It will still have the same indentation as it has it before.
> The correct/expected behaviour is only supported for Java. No support for PHP, JS, CSS/SCSS/LESS, HTML/XML. I didn't test it in C/C++ but I guess it will not work there too. So this must be a generic language feature.



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

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

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