Useful Shortcuts
- Open the command palette: cmd + shift + p
- Search for files: cmd + p
- Execute code cell in Interactive python window: ctrl + enter
- Format file: alt + shift + f (Do not set format automatically, adds too much hassle)
Interesting settings:
- Saving: Set save after delay, to stop hitting cmd + s, that's unnecessary
- Formatting: Do not set format on save, don't question it, just use black.
Merge conflicts
- Resolve Merge conflicts:
- Open the command palette
- git merge...
- select branch to merge from (make sure it is pulled or take the remote one)
- open merge editor
Git diff
- Local Git diff: There doesn't seem to be a command in the command palette for it. Don't use the terminal, viewing git diffs in it is trash.
- click on the branch symbol in vs code
- Click on Source Control/it is open by default
- For local git diffs: The file should already be in changes. Just click on it
- Git diff with different branch
- Install Gitlens plugin
- command palette: Compare working tree with. Make sure the right branch is checked out.
Interactive Python Window
I removed the keybindings that execute one line with shift + enter so now it will execute the codeblock and move to the next codeblock.
Formatter
Just use black, don't think about it. Ignore anything like isort, it is not worth the hassle.