Plugin: Note Tabs

That sounds like a useful extension. I will add it to the plugin. I could imagine an enum choose different behaviors: KEEP_SELECTED, SELECT_LAST_ACTIVE, SELECT_ADJACENT (left or right, depending which exists). That would then also affect the following behavior.

It's not a bug, it's a feature. :wink:

A few details about the implemented behavior... I basically adopted this from the VS Code Editor, as I like it a lot and it seemed best for me. With the difference that the plugin only knows the states temporary and pinned. VS Code has a third open. Whereas pinned in the plugin rather corresponds to the state open of VS Code.

  • When I open a note, it is first added as a temporary tab (the italic one).
    • It will only be pinned if edited or by user request.
  • There can be at most one temporary tab.
  • The last opened temporary note is saved. So it keeps open.

This currently causes that when the selected note is unpinned, it stays there as a temporary tab and overwrites the other temporary one.

But I'm just seeing that the behavior here is slightly different from the VS code. It selects the last edited one when closing the active and open tab. This would correspond to SELECT_LAST_ACTIVE with the new setting from above.

Would this be a solution for you?