vscode-restore-git-branch-tabs icon indicating copy to clipboard operation
vscode-restore-git-branch-tabs copied to clipboard

Feature request: An option to ignore untracked tabs

Open screenbeard opened this issue 5 years ago • 4 comments

When I switch branches I sometimes have throwaway files open with scraps of data or important but temporary information. I don't want those closed necessarily, and I'm often not in the headspace when switching branches to really think about whats in those tabs. I'd love an option to just ignore those entirely and leave them open while restoring everything else.

Of course I'm not sure this is currently possible with the way Restore Git Branch Tabs and Restore Editors implement their features, but would love to see it as Code's APIs improve.

screenbeard avatar Feb 27 '20 00:02 screenbeard

I like this, but I would go one step further and have two options, one for unsaved files and one for untracked files. I personally would like to be warned if I have an unsaved file that's in the repo before switching branches, but if the file is untracked then it can just stay there because it's probably scrap.

zachdirk avatar Feb 28 '20 16:02 zachdirk

@zachdirk This is exacly what I meant - yes. Sorry I used the wrong terms. I'll update my title and post if I can

screenbeard avatar Feb 29 '20 03:02 screenbeard

I find myself always having scrap untitled, unsaved tabs open. I like this idea. Here is what I am thinking, let me know if you have something else in mind.

Have two settings, one for how to handle untitled, unsaved files and another for handling untracked files (include files opened from outside the repo). For untitled tabs, the options would be to ignore them and keep them open, always close them (and lose the data), or have a prompt asking to keep open or close when one is found. For the untracked tabs, something similar. Treat them as tracked and close them and restore them later, ignore them and leave them open, or prompt for the desired action.

gkotas avatar Mar 01 '20 02:03 gkotas

I like this. If I understand correctly I think you could have a third option for untitled, unsaved tabs where you title, save, and add it to the list of files to close and restore all in one go.

zachdirk avatar Mar 02 '20 01:03 zachdirk