• Login
Community
  • Login

Pinning or locking specific tabs?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
5 Posts 3 Posters 1.4k 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.
  • D
    Duality CA
    last edited by Apr 30, 2024, 7:19 AM

    Is it in base notepad++, or any plugins? I frequently open dozens of files, sometimes hundreds (editing game mod files) so it would be convenient for me to have a few tabs locked (so they don’t get deleted when I delete all tabs with close-all button)

    A M 2 Replies Last reply Apr 30, 2024, 10:59 AM Reply Quote 0
    • A
      Alan Kilborn @Duality CA
      last edited by Alan Kilborn Apr 30, 2024, 11:10 AM Apr 30, 2024, 10:59 AM

      @Duality-CA said in Pinning or locking specific tabs?:

      Is it in base notepad++, or any plugins

      No.

      It is a feature that has been requested a few times on the official issues list, but developers have not taken it up. For one example, see HERE.

      It can be approximated by a script that would group “pinned” tabs to the left of all other tabs. Then a close of all non-“pinned” tabs could be done by right-clicking the rightmost “pinned” tab and choosing Close Multiple Tabs > Close All to the Right.

      I will attempt to write such a script and post it here…

      A 1 Reply Last reply May 10, 2024, 11:02 AM Reply Quote 4
      • M
        mkupper @Duality CA
        last edited by Apr 30, 2024, 6:24 PM

        @Duality-CA. within Notepad++ there are a couple of ways to have what amounts to pinned tab lists.

        See this in the manual - https://npp-user-manual.org/docs/session/

        I think you would be interested in using either session.xml files, which are much like the plain-text pinned.txt I use, or Project Panels, which is a more GUI oriented way of doing it.

        The advantage of the session approach is that you can have any number of session.xml files that contains the list of files related to a specific game or project.

        Neither of those does exactly what you want which would be making it so you can declare tabs as “pinned” and that the various Close Multiple Tab options don’t close pinned tabs. Both of them though allow you to define lists of files and to open the list of files in one shot.

        1 Reply Last reply Reply Quote 3
        • A
          Alan Kilborn @Alan Kilborn
          last edited by Alan Kilborn May 10, 2024, 11:07 AM May 10, 2024, 11:02 AM

          @Alan-Kilborn said in Pinning or locking specific tabs?:

          I will attempt to write such a script and post it here

          My plan for the script was (and is) to dedicate one of the “tab color” choices (ref. View menu > Tab > Apply Color …) to signify a “pinned tab”. So here’s an example of what it might look like, with two pinned tabs:

          6c6343a5-da86-4913-97e7-fd0962124f68-image.png

          So in the screenshot, tabs new 3 and new 8 are “pinned” and I’ve used the green tab coloring to signify this.

          Unfortunately, as of N++ 8.6.6, there is no easy way for a plugin (e.g. a scripting plugin) to “get” what the current tab color is on a tab. There’s a way to “set” the tab color (using the menu-id method), but, because pinning-via-script isn’t going to be a 100% rock-solid thing (there will be things a user can do that could mess it up), I’d feel better if the script could “see” the current tab coloring and possibly take some (corrective) action based upon that.

          So…long story…but I’m going to take a break from this script while I make and possibly implement a feature request to allow plugins to set/get tab colors. The feature request may be found HERE.

          A 1 Reply Last reply May 22, 2024, 7:26 PM Reply Quote 4
          • A
            Alan Kilborn @Alan Kilborn
            last edited by May 22, 2024, 7:26 PM

            @Alan-Kilborn said in Pinning or locking specific tabs?:

            possibly implement a feature request to allow plugins to set/get tab colors

            The implementation is finished and should be in Notepad++ 8.6.8.
            After that version is released, I’ll finish up and publish the script to pin tabs.

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