vscode-diff
vscode-diff copied to clipboard
default left and right files/folders
Hi, can we provide defaults for left/right files and folders so that CMD+LL will open that immediately?
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.
How can we add favorites via cli then? No human should be needed until the window is opened with relevant diff
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.
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.
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?
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
So something like:
"l13Diff.initialFavorites": [
{ "leftFolder": "${workspaceFolder}/bla", "rightFolder": "${workspaceFolder}/dida" }
]
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.
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.
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"
https://github.com/microsoft/vscode/issues/174082
I think this is a better solution. I recommend to upvote the issue on the vscode repository.
Great idea! Can you share a link?
I figured out that somebody still opened the same issue like I mentioned in the comment before. You can find it here
https://github.com/microsoft/vscode/issues/105487