fabiospampinato / vscode-diff

Diff 2 opened files with ease. Because running `code --diff path1 path2` is too slow.
MIT License
40 stars 9 forks source link

List only open files #18

Closed PhasorLaser closed 7 months ago

PhasorLaser commented 3 years ago

I would like the list to be just the "open" files meaning what I have tabs of open in the VS workspace...Otherwise the list feature is not usable, thus the point is lost

fabiospampinato commented 2 years ago

Last time I looked there wasn't an API for retrieving a list of open files.

nemoDreamer commented 1 year ago

The extension does advertise itself with:

Diff 2 opened files with ease.

😜


If there's no API to access tabs, maybe an exclude setting would ease the pain of waiting for 10+ seconds for the file selector to populate, as it's retrieving everything in .cache/jest/ and ./node-modules/.cache/ for example?

image
fabiospampinato commented 7 months ago

As of v2 open files are now listed at the top of the list.

Screen Shot 2024-03-14 at 19 03 18

If you want to remove other kinds of files you can override the diff.include setting, or the diff.exclude setting, to make sure nothing passes those filters.

Potentially a dedicate command that only lists open files can be added, but it seems a bit superflous?

fabiospampinato commented 7 months ago

This is customizable in v2.1, if you only want to see open files use these settings:

  "diff.showUntitledFiles": true,
  "diff.showOpenFiles": true,
  "diff.showFoundFiles": false,
  "diff.showFoundRelativeFiles": false