[Waiting for PR review] Ability to pin tabs


#1

I’m the developer of zentabs which come with the ability to pin tabs so they don’t get closed automatically.

One of the caveat of this plugin tab pinning implementation is that it’s restricted to the plugin and commands such as close-other-tabs or close-all-tabs don’t take pinned status into account, as user noticed.

The only way of fixing that is by implementing the pin tab feature right into the tabs core plugin.

The TL;DR feature description is that all closing commands affecting several tabs (close-others, close-tabs-to-right, …) won’t affect pinned ones. Single tab closing command (close-tab), will close it anyway (not need to unpin first).

The good news is that I’ve done it and it’s waiting for review.

Here is a demo:

It’s a little bit opinionated as I have chosen to add some styling (title is bold + lock icon is shown, overriding any existing icon) but I’d like to have your opinions on this.

Waiting for your comments!


#2

Could be handy, but wouldn’t it make more sense to change the close icon (x) to a lock instead? Replacing the icon makes me think that the file itself is locked.


#3

Oh your are right it does make sense to replace the close icon instead of the file icon. The close icon would come back when hovered, to show that you can still close it.

I’ll try to push a updated version, to see how it compares.


#4

As promised, I updated the behaviour:


#5

I’ve thought of this functionality at some points as I often use pinned tabs when browsing. However, one of the main benefits it has in web browsers is that pinned tabs use much less space and they’re always positioned as the first tabs (left to right). This would make them very useful for having a tidy workspace.


#6

Can you change the icon from a lock to a pushpin? The lock icon generally means that a file cannot be edited.