VS Code
Contents
Handy Tricks for VS Code
Extensions
Useful extensions for everyday use.
Shortcuts
Open via Preferences -> Open Keyboard Shortcuts (JSON)
Python Cell Symbol
Keyboard binding to add #%% to the in focus script.
{
"key": "ctrl+shift+a",
"command": "type",
"args": {"text": "#%%"},
"when": "editorTextFocus"
}
Send Text to Terminal
Binding to send any selected text to the current terminal. Useful when coding in a language with poor interactive support (eg anything other than python)
{
"key": "ctrl+shift+enter",
"command": "workbench.action.terminal.runSelectedText"
}
Force Clean workspace
To force vscode to open a new, clean workspace when opening (unless specifically opening from a directory) update:
- Window: Restore Windows
- “none”