Navigation

    Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Inconsistent tab behavior when using replace by space

    Help wanted · · · – – – · · ·
    tabs
    5
    12
    1006
    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.
    • John Booth
      John Booth last edited by

      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?

      Ekopalypse 1 Reply Last reply Reply Quote 0
      • Ekopalypse
        Ekopalypse @John Booth last edited by

        @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
        • PeterJones
          PeterJones last edited by

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

          Alan Kilborn 1 Reply Last reply Reply Quote 2
          • John Booth
            John Booth last edited by

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

            1 Reply Last reply Reply Quote 0
            • Alan Kilborn
              Alan Kilborn @PeterJones last edited by

              @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
              • PeterJones
                PeterJones last edited by PeterJones

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

                andrecool-68 1 Reply Last reply Reply Quote 2
                • John Booth
                  John Booth last edited by

                  @Peter-Jones

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

                  1 Reply Last reply Reply Quote 0
                  • andrecool-68
                    andrecool-68 @PeterJones last edited by

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

                    1 Reply Last reply Reply Quote 1
                    • PeterJones
                      PeterJones last edited by

                      @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
                      • John Booth
                        John Booth last edited by

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

                        John Booth 1 Reply Last reply Reply Quote 3
                        • John Booth
                          John Booth @John Booth last edited by

                          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
                          • PeterJones
                            PeterJones last edited by

                            @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
                            • First post
                              Last post
                            Copyright © 2014 NodeBB Forums | Contributors