How to rename an editor tab?



  • 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”.



  • 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.logwithout having to save the file to the disk.
    Alt



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



  • 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


  • 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;


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


Log in to reply