Created
September 18, 2024 07:59
-
-
Save marxin/1ba3bd38e5bf9c76628935d604c7ad7d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Place your key bindings in this file to override the defaultsauto[] | |
[ | |
{ | |
"key": "alt+left", | |
"command": "workbench.action.navigateBack", | |
"when": "canNavigateBack" | |
}, | |
{ | |
"key": "ctrl+alt+-", | |
"command": "-workbench.action.navigateBack", | |
"when": "canNavigateBack" | |
}, | |
{ | |
"key": "alt+right", | |
"command": "workbench.action.navigateForward", | |
"when": "canNavigateForward" | |
}, | |
{ | |
"key": "ctrl+shift+-", | |
"command": "-workbench.action.navigateForward", | |
"when": "canNavigateForward" | |
}, | |
{ | |
"key": "f7", | |
"command": "runCommands", | |
"args": { | |
"commands": [ | |
"workbench.action.terminal.focus", | |
{ | |
"command": "workbench.action.terminal.sendSequence", | |
"args": { | |
"text": "cargo build\n" | |
} | |
} | |
] | |
}, | |
// https://rust-analyzer.github.io/manual.html#special-when-clause-context-for-keybindings | |
"when": "inRustProject" | |
}, | |
{ | |
"key": "ctrl+f7", | |
"command": "runCommands", | |
"args": { | |
"commands": [ | |
"workbench.action.terminal.focus", | |
{ | |
"command": "workbench.action.terminal.sendSequence", | |
"args": { | |
"text": "cargo build --release\n" | |
} | |
} | |
] | |
}, | |
"when": "inRustProject" | |
}, | |
{ | |
"key": "ctrl+f5", | |
"command": "runCommands", | |
"args": { | |
"commands": [ | |
"workbench.action.terminal.focus", | |
{ | |
"command": "workbench.action.terminal.sendSequence", | |
"args": { | |
"text": "cargo run --release\n" | |
} | |
} | |
] | |
}, | |
"when": "inRustProject" | |
}, | |
{ | |
"key": "f6", | |
"command": "runCommands", | |
"args": { | |
"commands": [ | |
"workbench.action.terminal.focus", | |
{ | |
"command": "workbench.action.terminal.sendSequence", | |
"args": { | |
"text": "cargo test\n" | |
} | |
} | |
] | |
}, | |
"when": "inRustProject" | |
}, | |
{ | |
"key": "ctrl+f6", | |
"command": "runCommands", | |
"args": { | |
"commands": [ | |
"workbench.action.terminal.focus", | |
{ | |
"command": "workbench.action.terminal.sendSequence", | |
"args": { | |
"text": "cargo test --release\n" | |
} | |
} | |
] | |
}, | |
"when": "inRustProject" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment