Jelmerro / Vieb

Vim Inspired Electron Browser - Vim bindings for the web by design
https://vieb.dev
GNU General Public License v3.0
1.32k stars 63 forks source link

Add the ability to group tabs by tagging them #541

Open simonhughxyz opened 9 months ago

simonhughxyz commented 9 months ago

Checklist

Due to my work, I need to have many tabs open, organising them can become a nightmare without the ability to have separate windows which is also a way to group tabs together. I know the separate window issue has been discussed before and its not something you like to work on so I propose a different solution to at least solve this one specific issue.

Addition or change It would be nice to be able to tag tabs so that one can manipulate them by referencing the tags. Each tab would be able to carry multiple names tags such as: work, personal, fun, project... You can then call a command on a any tab that carries a tag.

For example: :closetag fun which would close all tabs tagged with fun

There could also be special tags with special functions, one Idea I have is the visible tag. This is a special tag that should get assigned by default to all tabs and Vieb should only show tabs that have the visible tag. In other words, hide any tabs without the visible tag.

That way you could make a custom command such as: :command BossIsComming <:hidetags fun, personal><:showtags work, project>

The hidetags command would remove the visible tag from tabs and the showtags command would add the visible tag. This custom command would then set all work and project tabs as visible and hide the fun, and personal tagged tabs.

This would allow one to organise and manipulate tabs better

Alternatives considered I thought of having multiple instances of vieb with different datafolder but I need to share cookies and site data.

Jelmerro commented 5 months ago

As you note, separate windows are supported fine if they use a separate datafolder (see :h datafolder). You can also supply --unsafe-multiwin=true, though this does mean that localstorage and cookies are likely to corrupt, as Chromium cannot handle multiple instances using the same store for this at the (exact) same time.

There are already container tabs in Vieb, which share their data only with tabs of the same container name. You can find help on this at :h containernames, :h containercolors and :h containernewtab among others. The color setting can even change the tab color based on the container name.

Given that containers are already there, I would suggest to expand the container system with extra commands that let you hide/show them in bulk based on title, as well as closing them by container name. I will think of suitable names for this, but ideas are also welcome. I am not a fan of using tags, as in the future bookmarks are bound to be using a tagging system too, so I would prefer to name this container labeling system differently.