VSCode
Setup
- install extensions:
- Remote-Containers
- on Ubuntu: only Dev-Containers
- C/C++
- Doxygen Documentation Generator
- CMake
- CMake Tools
- Python (for debugging)
- Pylance
- Jupyter
- Jupyter Keymap
- Jupyter Notebook Renderers
- TabNine Autocompletion
- vim
- Markdown PDF
- for md2pdf conversion
- Remote-Containers
- for Spring Boot in vscode:
- set "Toggle Vim Mode" command keybinding "ctrl + alt + v" in menu "Manage" (unten links) → keyboard shortcuts → search "togglevim"
Reset
- if something does not work, e.g.
- context menu is popping up automatically on vscode startup
- stackoverflow instructions
- settings:
- Press F1
- Type user settings
- Press enter
- Click the "sheet" icon to open the settings.json file
- delete the file's contents and save
- extensions:
- delete
~/.vscode/extensions
- delete
- settings:
Vim Mode
| command | description |
|---|---|
| ctrlaltv | toggle vim mode (this custom shortcut must have been configured previously) |
Search Shortcuts
| command | description |
|---|---|
| ctrlk ctrls | all shortcuts |
Tabs
| command | description |
|---|---|
| ctrlw | close current tab |
Workspaces
| command | description |
|---|---|
| ctrlr | open workspace ... |
Open Files
| command | description |
|---|---|
| ctrle or ctrlp | Go to file ... |
| ctrlo | open file |
| ctrln | new file |
Git
| command | description |
|---|---|
| ctrlshiftg | Git |
| "Timeline" view under the File Explorer | Git "Timeline" for a specific file (click on the "view commit" symbol on the right side of the commit to view all changes of all files in the commit) |
View
| command | description |
|---|---|
| ctrl0 | focus file explorer |
| ctrl1 | focus editor group 1 |
| ctrl2 | focus editor group 2, usw. |
| ctrlw | close current editor group (after all tabs in this group have been closed) |
| alt1 | focus first tab in current editor group |
| alt2 | focus second tab in current editor group, usw. |
| ctrlj | show panel (problems, output, terminal, debug console) |
| ctrlö | view: toggle terminal |
| ctrlshifty | view: toggle debug console |
| ctrlb | show side bar (file explorer) |
Fold
| command | description |
|---|---|
| ctrlk ctrlt | change theme |
| ctrlk ctrl0 | collapse all |
| ctrlk ctrl1 | collapse level 1 |
| ctrlk ctrlj | unfold all |
Jump
| command | description |
|---|---|
| ctrlshift. | focus breadcrumbs (jump between methods/functions) |
| ctrlalt- | go back (i.e. jump to previous location) (Windows: altleft) |
| ctrlshift- | go forward (i.e. jump to next location) (Windows: altright) |
| ctrlk ctrld | "move last selection to next find match" (like * in Vim) |
| ctrld | "add selection to next find match" (for quickly modifying multiple occurrences of the selected code simultaneously) |
Write
| command | description |
|---|---|
| ctrlh | find and replace (in the replace window press ctrlaltenter to replace all) |
| ctrlc | copy line |
| shiftaltDown | copy line down |
| ctrlx | cut line |
| ctrlshiftk | delete line |
| ctrll | expand line selection |
| altshiftright | expand selection |
| ctrlk ctrlc | add line comment |
| ctrlk ctrlu | remove line comment |
| ctrlshifti | format file (in command palette: "format document") |
| ctrlkctrlf | format selection |
| ctrlshiftup/down | place cursor on multiple lines |
| ctrlshiftup/down, ctrlx | select and cut multiple lines |
Markdown
| command | description |
|---|---|
| ctrlshiftv | toggle preview/edit |
| ctrlk v | side-by-side preview |