Community
    • Login

    Pinning or locking specific tabs?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 3 Posters 2.1k Views 2 Watching
    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.
    • Duality CAD Offline
      Duality CA
      last edited by

      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)

      Alan KilbornA mkupperM 2 Replies Last reply Reply Quote 0
      • Alan KilbornA Offline
        Alan Kilborn @Duality CA
        last edited by Alan Kilborn

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

        Alan KilbornA 1 Reply Last reply Reply Quote 4
        • mkupperM Offline
          mkupper @Duality CA
          last edited by

          @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
          • Alan KilbornA Offline
            Alan Kilborn @Alan Kilborn
            last edited by Alan Kilborn

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

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

              @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

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors