• Login
Community
  • Login

Feature Request: Colourized Tabs based on Folder Path. Please

Scheduled Pinned Locked Moved Notepad++ & Plugin Development
tabs features
7 Posts 3 Posters 708 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.
  • I
    innoovative thiinking
    last edited by innoovative thiinking Jan 6, 2024, 4:07 AM Jan 6, 2024, 3:43 AM

    Hi there ,

    I use np++ daily for updating several gameservers.
    from which i am updating several .ini files from each gameserver depending on which one iam working on.

    what i find happens is i open 1 file from server 1 then a 2nd file from server 2 and server 3 i open 3 files.
    then i need to edit another file from server 1 .

    so now my tab bar looks like this;

    1-2-333-1
    ^ files and servers.

    in this case i would drag the right hand 1 to the start of the stack.
    11-2-333

    So now my tabs are in order.
    But when iam opening multiple files from each different server then the tabs bar becomes a mess

    thats when it hit me… colorize tabs based on source files working folder.
    group tabs together through right click menu. all the tabs from this folder on the left and all the files from that folder on the right.

    in my case i would have red , yellow , green tabs… representing servers 1 , 2 & 3.
    111-222-3333
    ^imagine the numbers are tabs in np++

    In theory if this was made and we had auto-grouping enabled then np++ could automatically put the new tab beside the last opened file from the same folder and highlight all other tabs from the same folder.

    alt text

    see how the current tab is orange highlighted?
    well imagine it being green and the other files that are from the same folder are also green.

    then we right click on any of the tabs and select group and all the tabs are reorganised into colored groups. red , blue , green , a different color for a different source folder.

    clicking on any tab also highlights all other tabs from the same folder.

    A 1 Reply Last reply Jan 6, 2024, 11:48 AM Reply Quote 1
    • M
      mkupper
      last edited by Jan 6, 2024, 4:49 AM

      I assume you are aware of right clicking on a tab and selecting Apply Color to tab.

      A partial workaround for you is to close/exit from Notepad++. This will save the session.xml file. Using either another copy of Notepad++ or Microsoft Notepad open the session.xml file. The file has one record or line per tab. You will be interested in two fields, the filename and the tabColourId.

      You can parse the path part of the file names to figure out what color to use. Using that, set the tabColourId value. The color values are:
      -1 No color
      0 yellow
      1 green
      2 blue
      3 orange
      4 purple
      5 or more black

      Restart Notepad++ and the tabs will be colored.

      1 Reply Last reply Reply Quote 3
      • A
        Alan Kilborn @innoovative thiinking
        last edited by Alan Kilborn Jan 6, 2024, 11:51 AM Jan 6, 2024, 11:48 AM

        @innoovative-thiinking :


        Maybe it is you making THIS official feature request?


        colorize tabs based on source files working folder

        It’s not necessarily a bad idea…but it is problematic.
        One could have many more folders than reasonable different colors to represent them.


        group tabs together through right click menu

        Assuming you mean the grouping criterion is the folder in which the tab files live, then:
        Window menu > Sort By > Path A to Z
        (if you would use this frequently, you can assign a shortcut key directly to it)


        clicking on any tab also highlights all other tabs from the same folder

        That aspect is interesting and could be occasionally useful.


        @mkupper said:

        parse the path part of the file names to figure out what color to use. Using that, set the tabColourId value

        Nice one!

        1 Reply Last reply Reply Quote 2
        • I
          innoovative thiinking
          last edited by Jan 7, 2024, 1:25 AM

          yes that was me…

          um the window > path A-Z didnt work so well

          A 1 Reply Last reply Jan 7, 2024, 1:43 AM Reply Quote 0
          • A
            Alan Kilborn @innoovative thiinking
            last edited by Jan 7, 2024, 1:43 AM

            @innoovative-thiinking said in Feature Request: Colourized Tabs based on Folder Path. Please:

            the window > path A-Z didnt work so well

            The logical question, and the one you could have anticipated and pre-answered, is: How so?

            I 1 Reply Last reply Jan 7, 2024, 4:07 AM Reply Quote 0
            • I
              innoovative thiinking @Alan Kilborn
              last edited by innoovative thiinking Jan 7, 2024, 4:28 AM Jan 7, 2024, 4:07 AM

              @Alan-Kilborn sorry for being so brief.
              when i sort by path A-Z it jumbles the files up rather then sort them into chronological order of sorts.

              for example a have 2 ini’s from each of 3 servers open
              i do the window > sort A_Z

              i would expect them to be put into order

              112233 or 221133 or 332211

              however i get 12 31 23

              perhaps as iam loading new files in from winscp they are loading into different folders.

              that could be the problem

              so although i am retrieving the files from the host directories they are being pulled into sep individual folders… hmm

              yeah just checked… they are all going into different folders.

              alt text

              alt text

              note the scp(number) in the path…

              looks like manual colorization and drag dropping is the way to go forth.

              perhaps this will help; https://winscp.net/eng/docs/script_download_files_to_same_folder

              A 1 Reply Last reply Jan 7, 2024, 11:30 AM Reply Quote 0
              • A
                Alan Kilborn @innoovative thiinking
                last edited by Jan 7, 2024, 11:30 AM

                @innoovative-thiinking said in Feature Request: Colourized Tabs based on Folder Path. Please:

                looks like manual colorization and drag dropping is the way to go forth.

                If I were you, I would not expect to see this behavior added to Notepad++, but, you never know.
                Good luck.

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