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

Viewed file should be remembered #237

Closed filikos closed 5 months ago

filikos commented 2 years ago

When following a code path down the codebase with CMD + Mouse I can navigate back the same way with ALT/Option + CMD + left arrow.

If I have the same file opened two times my cursor suddenly navigates to the second opened file even though it was not in the view originaly. This behavour can be avoided, when navigating "up" (ALT/Option + CMD + left arrow) or "down" (ALT/Option + CMD + right arrow) it would be more intuitive when the cursor remains in the file which was used to navigate originaly so the view will not suddenly change.

wdyt?

kasecato commented 6 months ago

I figured out that this was due to the default bindings in VSCode So, I'll disable the default bindings of VS Code and perhaps we can resolve this

// VS Code (Win)
{
  "key": "ctrl+alt+right",
  "command": "workbench.action.moveEditorToNextGroup"
}
// IntelliJ (Win)
{
  "key": "ctrl+alt+right",
  "command": "workbench.action.navigateForward",
  "when": "canNavigateForward"
}
// VS Code (Win)
{
  "key": "ctrl+alt+left",
  "command": "workbench.action.moveEditorToPreviousGroup"
}
// IntelliJ (Win)
{
  "key": "ctrl+alt+left",
  "command": "workbench.action.navigateBack",
  "when": "canNavigateBack"
}
kasecato commented 5 months ago

Released v1.6.1