Jelmerro / Vieb

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

What can one do with tab containers? #482

Closed gknittl closed 1 year ago

gknittl commented 1 year ago

Checklist

What needs to be solved I'm using Firefox and I don't use bookmarks either. Instead I have 1000s of tabs open and out of control.

Vieb keeping tabs in plain text instead of Firefox's custom file format gives me hope I could at least brute force manage tabs outside of Vieb, but it would be nice if there were more native support for tab containers in Vieb. For example I assume that I could have a file for tabs I don't want to use this session and pretty much arbitrarily move tabs back and forth between tabs and the not used tabs file before launching vieb. This is still better than Firefox but it would be nice to be able to do this more dynamically.

Steps that have been attempted Am just a few hours into Vieb using the checklist above. I'm hoping I've missed some documentation of the full capabilities of containers.

Jelmerro commented 1 year ago

Containers separate data from tabs/pages that use a different container. Each container gets a separate sub-folder for all it's data inside the datafolder, meaning you can separate browser data/habits in different containers to make sure the data is not shared between sites. It is not a substitute for grouping tabs in any way, just a method to separate data into a container. If you want more control of which tabs are opened, take a look at Erwic mode and/or use separate datafolders (see :help datafolder) for completely different windows which can also keep the data separate.

I'll close this issue as it's more of a question than anything feature/bug related, but feel free to continue asking questions below if needed.

gknittl commented 1 year ago

Thanks! I have a lot of YouTube tabs. Say I start with containers for main and youtube and open separate Vieb windows for YouTube and main containers. I'm in the YouTube Vieb window and there is a link to something outside of YouTube in one of the comments sections. If I follow it, I then also have a "main" container tab in my YouTube Vieb datafile. I expect that from time to time I would have to merge all the YouTube items under main back into the youtube datafile and vice versa merge the main tab under youtube back into main. Any comments on how involved it is to merge tabs files and Partitions files like this? The actual tabs portion of the tabs file looks reasonably straightforward to manipulate, but the closed portion of the tabs file looks more complicated to merge. Are the files under Partitions designed to withstand this type of editing?

The main thing I think I care about at the moment is keeping the tabs in separate Vieb windows, not so much exactly where the Partitions files are. Mostly, I'm going to be in one Vieb window or another, so mostly I could "probably" get by with one set of Partitions files. Is it possible to share Partitions files across data folders, perhaps with symlinks? That would eliminate having to sync the Partitions files (assuming they survive potential corruption).

Jelmerro commented 1 year ago

Multiple windows are not properly supported, there is an unsafe startup flag to enable it, but there is no communication between windows. This is because Chromium itself does not handle multiple windows using the same cookies and localstorage very well, so I also did not spend time to make this use case work, as it would still corrupt user data even if Vieb handled everything smoothly (do check the FAQ item). So at the moment the best you can do is either use the same window and make containernames rules to automatically switch container for youtube, but this will keep them in the same window, or use a separate datafolder for all your youtube videos, though in that case you will need to copy/paste links over, or figure something out with opening links externally either with x or by making newtabs open externally, and then have a script be opened that sends it to the right Vieb instance as a new link.