Auto-indentation stopped working?



  • I think after the last update, the auto-indentation stopped working. So now when I type {} and put the cursor within the braces and hitting enter, no auto-indent happens. I remember I updated Notepad++ few hours ago, so that must be it?



  • @ethmz

    not every language supports this. Which one are you using?
    C++ seems to do it.

    Cheers
    Claudia



  • I’m using it for PHP, javascript and CSS, both used to work and now, both are not working.

    I checked in “Settings” > “Preferences” > MISC. and auto-indent is checked.



  • Ok I found out what was causing this problem.

    It looks like if you turn on the ‘Autoclose Brace’ in TextFX > TextFX Settings, then it breaks auto-indentation.



  • @ethmz

    Boon and bane of plugins, each could easily break other,
    but good to see that you’ve solved it.
    Btw. just for information, Npps auto-indent is different
    from the one you’ve reported. The latter is done by the lexer,
    that’s the reason why not every language has such feature.
    Npps auto-indent feature works like this,
    you set the indent, by pressing tab or space once and the
    following lines will follow this indent as long as you reset it.

    Cheers
    Claudia



  • @Claudia-Frank

    OK, I turned ‘Autoclose Brace’ in TextFX > TextFX Settings back on, seems that now indentation is working so maybe it was something else or was just some kind of glitch. Weird.

    And thanks for the clarification on the Npps auto-indent feature, years using Npps and apparently I actually never understood that feature right until today :)



  • @Claudia-Frank said:

    Npps auto-indent feature works like this,
    you set the indent, by pressing tab or space once and the
    following lines will follow this indent as long as you reset it

    I think I understand how the auto-indent works, but I wonder if I am missing out on true understanding because I don’t understand @Claudia-Frank 's last part: “…as long as you reset it”

    Is there a way to clarify what is meant by this?



  • @Scott-Sumner

    Is there a way to clarify what is meant by this?

    to avoid misunderstanding because of my version of english ;-)
    let me try to explain by example, even so I know you already know this.

    Cursor is at position 0 (first line - first column)
    by pressing tab (and assuming tab width is set to 4) cursor moves to position 4 (column 4)
    now pressing enter, cursor is at position 10 (second line column 4).
    Every new line will also start at column 4 as long as you reset it by e.g. pressing backtab.

    Cheers
    Claudia


Log in to reply