• Login
Community
  • Login

Auto-indentation stopped working?

Scheduled Pinned Locked Moved General Discussion
8 Posts 3 Posters 7.0k 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.
  • E
    ethmz
    last edited by Dec 11, 2016, 9:26 AM

    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?

    C 1 Reply Last reply Dec 11, 2016, 11:35 PM Reply Quote 0
    • C
      Claudia Frank @ethmz
      last edited by Dec 11, 2016, 11:35 PM

      @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
      • E
        ethmz
        last edited by Dec 12, 2016, 8:15 PM

        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
        • E
          ethmz
          last edited by Dec 12, 2016, 10:02 PM

          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.

          C 1 Reply Last reply Dec 13, 2016, 12:13 AM Reply Quote 0
          • C
            Claudia Frank @ethmz
            last edited by Dec 13, 2016, 12:13 AM

            @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

            S 1 Reply Last reply Jan 10, 2017, 9:05 PM Reply Quote 0
            • E
              ethmz
              last edited by Dec 13, 2016, 4:50 AM

              @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
              • S
                Scott Sumner @Claudia Frank
                last edited by Jan 10, 2017, 9:05 PM

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

                C 1 Reply Last reply Jan 10, 2017, 9:27 PM Reply Quote 0
                • C
                  Claudia Frank @Scott Sumner
                  last edited by Jan 10, 2017, 9:27 PM

                  @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