Community
    • Login

    Auto-indentation stopped working?

    Scheduled Pinned Locked Moved General Discussion
    8 Posts 3 Posters 7.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ethmzE
      ethmz
      last edited by

      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?

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @ethmz
        last edited by

        @ethmz

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

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • ethmzE
          ethmz
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • ethmzE
            ethmz
            last edited by

            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.

            Claudia FrankC 1 Reply Last reply Reply Quote 0
            • Claudia FrankC
              Claudia Frank @ethmz
              last edited by

              @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

              Scott SumnerS 1 Reply Last reply Reply Quote 0
              • ethmzE
                ethmz
                last edited by

                @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 :)

                1 Reply Last reply Reply Quote 0
                • Scott SumnerS
                  Scott Sumner @Claudia Frank
                  last edited by

                  @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?

                  Claudia FrankC 1 Reply Last reply Reply Quote 0
                  • Claudia FrankC
                    Claudia Frank @Scott Sumner
                    last edited by

                    @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

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    The Community of users of the Notepad++ text editor.
                    Powered by NodeBB | Contributors