• Login
Community
  • Login

Inconsistent tab behavior when using replace by space

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
tabs
12 Posts 5 Posters 1.9k 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.
  • J
    John Booth
    last edited by Apr 17, 2019, 4:13 PM

    I am seeing inconsistent tab behavior when using the “Replace by space” preference versus using the actual tab character. When using the tab character the behavior is really more of a tab stop. In other words, the tab length is shortened to always have the first character after a tab at the same location for multiple lines. When using the “Replace by space” preference the behavior is more of just a hard number of spaces regardless of location.

    For example typing the same lines of code with a tab size of 4 but different setting I see differing results. I will note that if I type the lines using tab mode and then use the Edit…Blank Operations…Tab to Space function to convert to spaces the behavior is what I would expect (the display remains unchanged).

    Tab mode:

    parameter NUMPGAS			= 20;
    parameter NUMGAINSETTINGS	= 11;
    parameter NUMDACCHS			= 18;
    parameter NUMDAC			= 3;
    

    Replace by space mode:

    parameter NUMPGAS            = 20;
    parameter NUMGAINSETTINGS    = 11;
    parameter NUMDACCHS            = 18;
    parameter NUMDAC            = 3;
    

    From all the other editors I’ve used (Multiedit, Crimson, Visual Studio, Eclipse) this feels like a bug. Might this ever get fixed? I’m new to NPP, is there a procedure for bug submission? Any suggestions for a workaround in the mean time?

    E 1 Reply Last reply Apr 17, 2019, 4:43 PM Reply Quote 0
    • E
      Ekopalypse @John Booth
      last edited by Apr 17, 2019, 4:43 PM

      @John-Booth

      I can’t seem to replicate your issue.
      When doing Tab2Space I get from

      this

      Works like it should unless I have misunderstood something.
      Do you maybe use an outdated npp version?

      1 Reply Last reply Reply Quote 1
      • P
        PeterJones
        last edited by Apr 17, 2019, 5:02 PM

        @John-Booth, welcome to the Notepad++ Community forum.

        You said:

        When using the “Replace by space” preference the behavior is more of just a hard number of spaces regardless of location.

        Like @ekopalypse, that’s not what I see. I did a ScreenToGif capture, and showed the difference between replace-by-space and just using normal tabs. The text all lines up exactly as I would expect:

        A 1 Reply Last reply Apr 17, 2019, 5:27 PM Reply Quote 2
        • J
          John Booth
          last edited by Apr 17, 2019, 5:27 PM

          Interesting. What version are you using? I’m using 7.6.6 - 64 bit.

          1 Reply Last reply Reply Quote 0
          • A
            Alan Kilborn @PeterJones
            last edited by Apr 17, 2019, 5:27 PM

            @PeterJones

            OT alert! :

            Nice “end frame” in the screencast but it doesn’t stay up long enough to really read it (much like credits on today’s TV shows). :)

            BTW, in the progress bar there are little tick marks occasionally…what are those?

            1 Reply Last reply Reply Quote 1
            • P
              PeterJones
              last edited by PeterJones Apr 17, 2019, 5:38 PM Apr 17, 2019, 5:37 PM

              @John-Booth,

              What version are you using? I’m using 7.6.6 - 64 bit

              I used 7.6.3 64-bit for the screencast.
              I just pulled up my 7.6.6 64-bit, and tried again. It worked as expected for me (screenshot, not animation, follows):

              -----

              @Alan-Kilborn said:

              OT alert! :

              I thought I set the end credits to 1s, but it doesn’t seem like it stayed quite that long. I drew that endcard (and made it identify me here and other forums, in case I ever post an animation on the StackExchange) just before the progress bar feature was pointed out.

              It turns out if you create the animation, add the red progress bar, then delete lots of frames where my typing was too slow to be noticed, the progress bar can start at 20%. So I haven’t figured out how to delete the existing progress bar or “regenerate it”. When I added a new one (yellow this time), it doesn’t always fully cover things, so sometimes the red sticks through. It’s weird. But lesson learned: don’t add progress bar until you’ve edited out any frames you don’t want, and until you’ve retimed any frames that are active too long or too short. Progress bar should be last step.

              A 1 Reply Last reply Apr 17, 2019, 5:57 PM Reply Quote 2
              • J
                John Booth
                last edited by Apr 17, 2019, 5:48 PM

                @Peter-Jones

                Hmm. Any special settings or plugins that might be fixing this for you?

                1 Reply Last reply Reply Quote 0
                • A
                  andrecool-68 @PeterJones
                  last edited by Apr 17, 2019, 5:57 PM

                  @PeterJones
                  If you save the animation as 2.0, then the progress bar looks prettier.

                  1 Reply Last reply Reply Quote 1
                  • P
                    PeterJones
                    last edited by Apr 17, 2019, 6:08 PM

                    @John-Booth said:

                    Any special settings or plugins that might be fixing this for you?

                    Nope. My 7.6.6 is an almost-pristine 7.6.6-64bit portable from the zip download:

                    Notepad++ v7.6.6   (64-bit)
                    Build time : Apr  3 2019 - 23:52:32
                    Path : C:\usr\local\apps\npp64.7.6.6\notepad++.exe
                    Admin mode : OFF
                    Local Conf mode : ON
                    OS : Windows 10 (64-bit)
                    Plugins : mimeTools.dll NppConverter.dll 
                    
                    1 Reply Last reply Reply Quote 2
                    • J
                      John Booth
                      last edited by Apr 17, 2019, 6:09 PM

                      I’m not real sure what caused, but after uninstalling/reinstalling NPP the behavior is working as expected. Thanks for the sanity check.

                      J 1 Reply Last reply Apr 17, 2019, 6:46 PM Reply Quote 3
                      • J
                        John Booth @John Booth
                        last edited by Apr 17, 2019, 6:46 PM

                        More details in case someone else should run into this down the road:

                        The root cause was due to dis-associating the tab key with the SCI_TAB command. I had done this so I could use tab for tag expansion with the Quicktext plugin. I guess I will have to find another hotkey to use.

                        1 Reply Last reply Reply Quote 5
                        • P
                          PeterJones
                          last edited by Apr 17, 2019, 7:20 PM

                          @John-Booth said:

                          More details in case someone else should run into this down the road:

                          Thanks for coming back with that. It will hopefully help future readers of this thread.

                          Glad it’s working for you now!

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