vscode-inline-bookmarks icon indicating copy to clipboard operation
vscode-inline-bookmarks copied to clipboard

Filter to all open editors

Open SamHasler opened this issue 5 years ago • 5 comments
trafficstars

It would be useful to have a filter to only see bookmarks in all open editors, not just the ones that are currently visible.

SamHasler avatar Jul 20 '20 11:07 SamHasler

interesting idea, shouldn't be a lot of work to implement.

tintinweb avatar Jul 20 '20 13:07 tintinweb

oh, @SamHasler just found out that I've already implemented this: (icon to the far right)

image

tintinweb avatar Jul 24 '20 12:07 tintinweb

I have tried using that button.

Perhaps I've not explained what I'm seeing, or perhaps it's that VS Code had changed what editors it tells extensions are open.

It seems that "Visible Editors" means "there is an editor open with a cursor in it", which usually means there is only one editor open at a time, sometimes two if I am viewing files side-by-side.

I was expecting visible editors to mean "files for which there is a tab open". That I would find much more useful.

Perhaps that's the way it worked when you wrote it but something has changed?

I'm on VSC version 1.47.2 if that helps.

SamHasler avatar Jul 24 '20 13:07 SamHasler

I did some research and there doesn't seem to be an API providing a list of open tabs/editors. ATM I can only get a list of visible editors unless I track windows manually which I'd like to avoid as it might come with a performance penalty.

https://github.com/microsoft/vscode/issues/15178

tintinweb avatar Jul 28 '20 08:07 tintinweb

This comment https://github.com/microsoft/vscode/issues/15178#issuecomment-624512992 looks promising that they'll have an API you can use once they decide to prioritise that issue. I'd vote for it if they hadn't locked it. I guess we'll just have to wait. Thanks for looking into this.

SamHasler avatar Jul 28 '20 11:07 SamHasler