• Login
Community
  • Login

How to rename an editor tab?

Scheduled Pinned Locked Moved Notepad++ & Plugin Development
renameediting tab
6 Posts 3 Posters 6.6k 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.
  • L
    loligans
    last edited by Jul 24, 2017, 7:58 PM

    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
    • L
      loligans
      last edited by Jul 24, 2017, 8:20 PM

      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
      • D
        Daniel Fuchs
        last edited by Jul 25, 2017, 6:46 AM

        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
        • L
          loligans
          last edited by Jul 25, 2017, 3:49 PM

          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
          • M
            MAPJe71
            last edited by Jul 25, 2017, 4:34 PM

            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
            • L
              loligans
              last edited by Jul 26, 2017, 4:31 PM

              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
              6 out of 6
              • First post
                6/6
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors