Community
    • Login

    How to rename an editor tab?

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    renameediting tab
    6 Posts 3 Posters 7.4k 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.
    • loligansL Offline
      loligans
      last edited by

      Hello,

      Is there a way to rename an editor tab that has not been saved to a file?

      Currently N++ will name a new editor “new 1” or “new 2” etc.

      What I am trying to do is rename it to something else like “My Awesome New Tab” or “Unsaved Editor Tab”.

      1 Reply Last reply Reply Quote 0
      • loligansL Offline
        loligans
        last edited by

        Here are some screen shots to help illustrate what I am trying to accomplish.

        Currently N++ will name a new editors “new 1” or “new 2” etc.
        Alt

        What I am trying to do is rename it to something else like “My Awesome New Tab” or “change.log” without having to save the file to the disk.
        Alt

        1 Reply Last reply Reply Quote 0
        • Daniel FuchsD Offline
          Daniel Fuchs
          last edited by

          I don’t think this is possible right now. May I ask, what this feature would be good for?

          1 Reply Last reply Reply Quote 2
          • loligansL Offline
            loligans
            last edited by

            Hi @Daniel-Fuchs

            I have written a plugin that decrypts a file before it is opened. It is important that the file remains encrypted on the disk. I could have pasted the decrypted text into the editor containing the encrypted text and marked it readonly, but I need to make sure the user doesn’t accidentally save over the file when pressing (Ctrl + S). This is why I open the decrypted file in a new editor tab.

            The plugin logic looks like this:

            1. User opens a file.
            2. Plugin detects if the file is encrypted using a proprietary format.
              a. If the file is encrypted then the plugin decrypts the file.
              b. After decrypting, the plugin pastes the content into a new tab. (At this point there will be 2 tabs open: The encrypted tab and the decrypted tab)
              c. Finally the plugin closes the tab containing the encrypted file.
            3. If the file is not encrypted using a proprietary format then plugin does not do anything
            1 Reply Last reply Reply Quote 1
            • MAPJe71M Offline
              MAPJe71
              last edited by

              You could also have your custom plugin:

              1. block saving the decrypted data after it’s pasted into the original tab;
              2. encrypt on save after decrypt on open;
              1 Reply Last reply Reply Quote 1
              • loligansL Offline
                loligans
                last edited by

                Hi @MAPJe71

                I think what you are suggesting would work, but I also think that being able to rename tabs would be a valuable feature to have because it will allow users or plugins to better organize their tabs.

                1 Reply Last reply Reply Quote 0

                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