kasecato / vscode-intellij-idea-keybindings

Port of IntelliJ IDEA key bindings for VS Code.
https://marketplace.visualstudio.com/items?itemName=k--kato.intellij-idea-keybindings
MIT License
817 stars 135 forks source link

ctrl+d in explorer should diff 2 selected files #231

Closed wibotwi closed 6 months ago

wibotwi commented 3 years ago

I manually added that keybinding with when=!editorTextFocus, which is needed to avoid conflicts with duplicate line in editor It works fine It does not compare dirs though, I assume VS Code does not know how to do that

wibotwi commented 3 years ago

actually better use: when=explorerViewletVisible && filesExplorerFocus

kasecato commented 6 months ago

IntelliJ supports triple file comparison, but VSCode doesn't, so we better to use listDoubleSelection in VSCode

            {
                "key": "ctrl+d",
                "mac": "cmd+d",
                "command": "compareSelected",
                "when": "filesExplorerFocus && !explorerResourceIsFolder && !inputFocus && listDoubleSelection",
                "intellij": "Compare Selected Files"
            },

https://code.visualstudio.com/api/references/when-clause-contexts#available-context-keys