Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default left and right files/folders #119

Open
Morriz opened this issue Dec 21, 2022 · 12 comments
Open

default left and right files/folders #119

Morriz opened this issue Dec 21, 2022 · 12 comments

Comments

@Morriz
Copy link

Morriz commented Dec 21, 2022

Hi, can we provide defaults for left/right files and folders so that CMD+LL will open that immediately?

@L13
Copy link
Owner

L13 commented Dec 21, 2022

Hi, cmd+l cmd+l has the current workspace as default for left. If you work with workspaces the first workspace is left and the second workspace is on the right. If you want to customize the paths you can use favorites which supports a placeholder ${workspaceFolder} or ${workspaceFolder:NAME} But there is no feature right now to customize a default path if you use the keyboard shortcut. For this case it is maybe a good idea to define a favorite as default.

@Morriz
Copy link
Author

Morriz commented Jan 3, 2023

How can we add favorites via cli then? No human should be needed until the window is opened with relevant diff

@L13
Copy link
Owner

L13 commented Jan 3, 2023

I fought about the idea again and I think the best choice is to implement slots from 1 to 9 like in my other extension Projects. This makes it possible to access your most important comparison immediately. No ui, just by shortcut.

@Morriz
Copy link
Author

Morriz commented Jan 6, 2023

But it is for automation, not humans. I only want a dev to do what is necessary. And have preconfigured what they need to look at. It would therefor be awesome if we could deliver configuration via .vscode/settings.json that does that.

@L13
Copy link
Owner

L13 commented Jan 6, 2023

Now I am really confused. The first post was about default paths, the second about cli, which vscode does not support for extensions and the third about the settings.json. Can you describe your use case, please?

@Morriz
Copy link
Author

Morriz commented Jan 6, 2023

just using code, the result should be:

defaults for left/right files and folders so that CMD+LL will open that immediately

I do not care how, but throughout our discourse I realized it is probably only possible through .vscode/settings.json

@Morriz
Copy link
Author

Morriz commented Jan 6, 2023

So something like:

  "l13Diff.initialFavorites": [
    { "leftFolder": "${workspaceFolder}/bla", "rightFolder": "${workspaceFolder}/dida" }
  ]

@L13
Copy link
Owner

L13 commented Jan 23, 2023

I'm still thinking about the use case for this feature and your suggestion for settings.json, because do you need workspace favorites which are stored in the local .vscode folder? So every project can have its own favorite comparisons. For this way it is maybe a better idea to have a new tab with workspace comparisons. You click on it and get immediately what you are looking for.

@Morriz
Copy link
Author

Morriz commented Feb 10, 2023

Our goal is to offer devs a link that opens vscode in the right location (side by side comparison view) to make decisions based on what they see immediately, without having to know or do anything to get there.

@L13
Copy link
Owner

L13 commented Feb 10, 2023

I suggested the idea for a new CLI command to the VS Code team. For example:

code --command "l13Diff.action.panel.openAndCompare" --args "/path/to/folder-a" "/path/to/folder-b"

microsoft/vscode#174082

I think this is a better solution. I recommend to upvote the issue on the vscode repository.

@Morriz
Copy link
Author

Morriz commented Feb 24, 2023

Great idea! Can you share a link?

@L13
Copy link
Owner

L13 commented Feb 24, 2023

I figured out that somebody still opened the same issue like I mentioned in the comment before. You can find it here

microsoft/vscode#105487

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants