Community
    • Login

    aligning tabs on the screen

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    17 Posts 6 Posters 21.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.
    • Meta ChuhM
      Meta Chuh moderator @Graham Wickens
      last edited by Meta Chuh

      @Graham-Wickens

      update: i found a solution for you and it is easy to implement:

      the developer @dail has created the plugin “Elastic Tabstops” some time ago, which addresses your specific needs.
      thanks @dail. 👍

      if you are on notepad 7.6 or above:
      go to plugins > plugins admin enter “elastic” in the search field.
      hit next until you see elastic tabstops.
      select it and hit install, as seen at the screenshot below.

      Imgur

      as soon as elastic tabstops is installed and enabled, it will automatically align all your data, as seen at the next screenshot.

      Imgur

      note: if you are on notepad++ 7.5.9 or below, and you have the 3rd party “plugin manager” installed, you can use it to automatically install the elastic tabstops plugin.
      for all other installation methods, please provide us with your notepad++ debug info by going to ? > debug info... > copy debug info to clipboard)

      for a manual installation, you can download the elastic tabstops plugin from here: https://github.com/dail8859/ElasticTabstops/releases


      i hope this is of service to you.

      if you are satisfied, please take the time to visit @dail 's original post >>> here <<< and give the developer an upvote.

      1 Reply Last reply Reply Quote 1
      • Meta ChuhM
        Meta Chuh moderator @Graham Wickens
        last edited by

        @Graham-Wickens

        here is one more screenshot, which could be of relevance to you.
        (last one, i promise 😉 )

        it has view > show symbol > show white space and tabs enabled.
        it shows every tab as an orange arrow, to verify that your original document is kept unmodified, and no tabs or spaces are added by the solution above.

        Imgur

        happy maintenance 👍

        Alan KilbornA 1 Reply Last reply Reply Quote 1
        • Alan KilbornA
          Alan Kilborn @Meta Chuh
          last edited by

          @Meta-Chuh

          Okay, so I’m not really following this thread closely, due to lack of interest, :) , but does the Elastic Tabstops plugin help out at all? Do you know that one?

          Meta ChuhM Alan KilbornA 2 Replies Last reply Reply Quote 0
          • Meta ChuhM
            Meta Chuh moderator @Alan Kilborn
            last edited by Meta Chuh

            @Alan-Kilborn

            yes, at least it does with the given sample.
            you can have a look at the screenshots from above to see for yourself.
            (or download the op’s text file to try it out and check if i missed anything)

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

              @Meta-Chuh

              See, I said I wasn’t following closely (I had no idea that Elastic Tabstops had already been considered in this thread when I proposed it. :) Sorry.

              1 Reply Last reply Reply Quote 0
              • Graham WickensG
                Graham Wickens
                last edited by

                Thank you, exactly what I was after. I am sure I could do it in an earlier edition , but then I can di it no w so that is great.

                1 Reply Last reply Reply Quote 1
                • andrecool-68A
                  andrecool-68
                  last edited by

                  Notepad++ is not microsoft office

                  Meta ChuhM 1 Reply Last reply Reply Quote 0
                  • Meta ChuhM
                    Meta Chuh moderator @andrecool-68
                    last edited by

                    @andrecool-68 said:

                    Notepad++ is not microsoft office

                    yes you are correct, but @dail got it solved 😉👍

                    1 Reply Last reply Reply Quote 0
                    • guy038G
                      guy038
                      last edited by guy038

                      Hello, @graham-wickens, @meta-chuh, @alan-kilborn and All,

                      Sorry, I was away from our forum, these last few days because of… fever and everything that goes with it:-(( Fortunately, it’s not flu. But I’m going to miss a wonderful sunny day of skiing, tomorrow, near Bourg-St-Maurice, with the other members of our ski section. Quite disappointing ! So, between two drugs, now that I’m getting some strength back, I just tried to test the ElacticTabstops plugin !


                      Recently, a friend of my wife asked me to do a little cleaning on her laptop, which has a lot of duplicate photos and music files ! And, before deleting anything, I preferred to create a complete list of all her files, with the excellent free software Everything of VoidTools, to get a general idea of her files structure !

                      https://www.voidtools.com/support/everything/

                      So, I got a .csv file, of 31100 lines, from 92 to 270 characters long, containing 6 fields, organized, as below :

                      "File/Directory Name","PathName",Size,"Ext",Modif Date / Hour,"Att"
                      "Croisière Oct. 2010" ,"H:\Photos Ordinateur 26012017",,"",2017-12-26 18:28:32,"D"
                      "P100279.jpg","H:\Photos Ordinateur 26012017\Croisière Oct. 2010",255898,"jpg",2010-10-17 11:50:26,"A"
                      

                      Of course, you know me ! Some regexes after…, I changed this .csv file to this nicer output, with aligned columns, in a table :

                      •---------------------•---------------------------------------------------•--------•-----•---------------------•-----•
                      | File/Directory Name |        Pathname                                   |  Size  | Ext |  Modif Date / Hour  | Att |
                      •---------------------•---------------------------------------------------•--------•-----•---------------------•-----•
                      | Croisière Oct. 2010 | H:\Photos Ordinateur 26012017"                    |        |     | 2017-12-26 18:28:32 |  D  |
                      | P100279.jpg"        | H:\Photos Ordinateur 26012017\Croisière Oct. 2010 | 255898 | jpg | 2010-10-17 11:50:26 |  A  |
                      •---------------------•---------------------------------------------------•--------•-----•---------------------•-----•
                      

                      In order to test the ElasticTabstops plugins and see if it could simplify the generation of this table , taking over the original .csv file, I just changed, again with regexes, all the comma delimiters with a tabulation character. Not that easy with real data…, as, both, names and pathnames could also contain commas ! Anyway, in the end, we get the text, with 5 tabulations per line :

                      "File/Directory Name"	"PathName"	Size	"Ext"	Modif Date / Hour	"Att"
                      "Croisière Oct. 2010"	"H:\Photos Ordinateur 26012017"		""	2017-12-26 18:28:32	"D"
                      "P100279.jpg"	"H:\Photos Ordinateur 26012017\Croisière Oct. 2010"	255898	"jpg"	2010-10-17 11:50:26	"A"
                      

                      saved as a regular .txt file

                      Assuming that you’ve installed the last release 1.3 release of ElasticTabstops, from below :

                      https://github.com/dail8859/ElasticTabstops/releases

                      And that you’ve checked the menu option View > Show Symbol > Show White Space and TAB

                      If you use the option Plugins > ElasticTabstops > Enable, you should obtain a text similar to :

                      "File/Directory Name"	"PathName"											Size	"Ext"	Modif Date / Hour	"Att"
                      "Croisière Oct. 2010"	"H:\Photos Ordinateur 26012017"								""		2017-12-26 18:28:32	"D"
                      "P100279.jpg"			"H:\Photos Ordinateur 26012017\Croisière Oct. 2010"	255898	"jpg"	2010-10-17 11:50:26	"A"
                      

                      And you’ve probably noted these 3 points :

                      • The different fields are, now, aligned, as expected

                      • The length of tabulations are quite variable, just in order to align the different columns

                      • And, more surprisingly, the current file does not seem to have changed. Just the display looks different !


                      Then, my first idea was to copy and save this new display and verify if the alignment was kept, after unchecking the option Plugins > ElasticTabstops > Enable. Unfortunately, I just got the initial text, with 5 tabulations per line Just silly, indeed ! On reflection, this seemed logical, as file contents have not been changed ;-))

                      Hence the real interest of the Convert Tabstops to Spaces option of the ElacticTabstops plugin. Once you’ve checked this option, we are left with the text, below, containing only spaces as blank characters :

                      "File/Directory Name" "PathName"                                          Size   "Ext" Modif Date / Hour   "Att"
                      "Croisière Oct. 2010" "H:\Photos Ordinateur 26012017"                            ""    2017-12-26 18:28:32 "D"
                      "P100279.jpg"         "H:\Photos Ordinateur 26012017\Croisière Oct. 2010" 255898 "jpg" 2010-10-17 11:50:26 "A"
                      

                      This time, the current file is really modified and you may save this aligned list. Now, it’s obvious that, using the Edit > Begin/End select option OR with few regexes, it’s rather easy to achieve any pleasant presentation of this directory/file’s list, because text is totally pre-aligned ;-))

                      Just note that this output minimizes the gap between columns to a single space character ;-)) ( even better than with the built-in N++ option Edit > Blank Operations > TAB to Space )


                      It’s important to point out the difference between the 1.3 and the 1.2 releases of ElasticTabstops

                      • In the old 1.2 release, when you enable ElasticTabstops, it may took some seconds before the new display, with variable tabulations, appears, when dealing with large files !

                      • With the last 1.3 release, the plugin limits the updating of the display, with elastic tabstops, to the current view, which strongly increases performance. Of course, this new behavior may change the columns size, dynamically, during scrolling !

                      But luckily, when you decide to use the Convert Tabstops to Spaces option, the plugin recalculates the width of tabstops, on the totality of current file ( as in the 1.2 version ), before changing them to space characters ;-))

                      For instance, with my test file of 9898 Kb, containing 31100 lines, with an average of 138 characters and 5 tabulations per line, I obtained, on my old Win XP laptop :

                      •----------------------------------------------------------•-------------•-------------•
                      |                      Option                              | version 1.2 | version 1.3 |
                      •----------------------------------------------------------•-------------•-------------•
                      | "Plugin > ElasticTabstops > Enable"                      |  4 seconds  |  Immediate  |
                      •----------------------------------------------------------•-------------•-------------•
                      | "Plugin > ElasticTabstops > Convert Tabstops to Spaces " | 15 seconds  | 15 seconds  |
                      •----------------------------------------------------------•-------------•-------------•
                      

                      Finally, the ElasticTabstops plugin should be very useful, if you have to change a large amount of data from a .dsv file ( Delimiter-separated values file ), whatever its separator, into aligned data columns, creating, implicitly, a data table/array. Simply :

                      • Change the field separator by 1 or 2 tabulation character(s), with a S/R

                      • Enable Elastic Tabstops

                      • Choose the Convert Tabstops to Spaces option

                      Et voilà !

                      Remark :

                      Let N be the number or space equivalent characters, defined for a tabulation character, in the Settings > Preferences... > Language > Tab Settings zone

                      Let T be the fixed number of tabulations, inserted between each group of two fields at step 1, above

                      Then, the minimum gap between the future columns, generated by the last step, is equal to N * ( T - 1 ) + 1 space characters

                      Best Regards,

                      guy038

                      P.S. :

                      I feel embarrassed ! I just forgot to thank @dail for this amazing and powerful plugin. ;-))

                      Meta ChuhM 1 Reply Last reply Reply Quote 2
                      • Meta ChuhM
                        Meta Chuh moderator @guy038
                        last edited by Meta Chuh

                        @guy038

                        Sorry, I was away from our forum, these last few days because of… fever and everything that goes with it:-((

                        i’m sorry to hear that, i hope you get completely well soon … and welcome back to the drug that is not skiing ;-)

                        I feel embarrassed ! I just forgot to thank @dail for this amazing and powerful plugin. ;-))

                        yes, dail made quite a few cool things, like his luascript plugin and scripts i use to eg. always see the last save date and time of a file at my notepad++ status bar.

                        i think we could use his help quite often for user questions like complementing missing udl lexer/highlighter features with the help of luascript eventhandlers, or automatically increment a line comment containing a version number (#version 1.2.3) with a +1 to the last value behind the last dot (#version 1.2.4) every time it’s saved.
                        but i never dare to tag-call him for help at any user’s thread that is yet unsolved.

                        1 Reply Last reply Reply Quote 2
                        • Mubashir 2018M
                          Mubashir 2018
                          last edited by dinkumoil

                          Hiii
                          is there anyone to help me
                          i have some notepad datas, i need to arrange this data into excel with the help of notepad++
                          i attached the source file and final files of screenshots,
                          please help me, i lost couple of months for doing this manually.

                          please help me…

                          [EDIT]
                          Screenshots deleted because they contained private data of a bunch of individuals.
                          @Mubashir-2018 Please anonymize your sample data.
                          [/EDIT]

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