VSCode Cheat Sheet and Knowledgebase: Unterschied zwischen den Versionen

Aus MattWiki
 
(7 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 4: Zeile 4:
!Action
!Action
|-
|-
|CTRL +   
|Ctrl + Shift + P
|Command palette
|-
|Ctrl + ,
|Open settings
|-
|Ctrl +   
|Zoom in
|Zoom in
|-
|-
|CTRL -
|Ctrl  -
|Zoom out
|Zoom out
|-
|-
|CTRL + ,
|Ctrl + K Ctrl + T
|Open settings
|Theme selector
|}
|}


== Editor ==
== Editor Shortcuts ==


=== Window Control ===
=== Window Control ===
Zeile 21: Zeile 27:
!Action
!Action
|-
|-
|CTRL + 1
|Ctrl + 1
|Go to first editor panel
|Go to first editor panel
|-
|-
|CTRL + 2 / 3
|Ctrl + 2 / 3
|Go to second / third editor panel, create one if not present
|Go to second / third editor panel, create one if not present
|-
|-
|CTRL + ^
|Ctrl + ^
|Split editor panel
|Split editor panel
|-
|-
|CTRL + W
|Ctrl + W
|Close file
|Close file
|-
|-
|CTRL + SHIFT + T
|Ctrl + Shift + T
|Reopen last closed file
|Reopen last closed file
|-
|-
|CTRL + TAB
|Ctrl + Tab
|Next tab
|Next tab
|-
|-
|CTRL + B
|Ctrl + B
|Toggle sidebar visibility
|Toggle sidebar visibility
|}
|}
Zeile 48: Zeile 54:
!Action
!Action
|-
|-
|ALT + ↑/↓
|Alt + ↑/↓
|Move line up/down
|Move line up/down
|-
|-
|SHIFT + ALT + ↑/↓
|Shift + Alt + ↑/↓
|Duplicate line up/down
|Duplicate line up/down
|-
|-
|CTRL + SHIFT + K
|Ctrl + Shift + K
|Delete line
|Delete line
|-
|-
|CTRL + Z
|Ctrl + Z
|Undo
|Undo
|}
|}
Zeile 66: Zeile 72:
!Action
!Action
|-
|-
|ALT + Click
|Alt + Click
|Add cursor
|Add cursor
|-
|-
|CTRL + D
|Ctrl + D
|Multi-select element
|Multi-select word
|-
|-
|CTRL + SHIFT + ALT + ↑/↓  
|Ctrl + Shift + Alt + ↑/↓  
|Add second cursor in the line above or below
|Add second cursor in the line above or below
|}
|}
Zeile 81: Zeile 87:
!Action
!Action
|-
|-
|CTRL + #
|Ctrl + #
|Comment / Uncomment line
|Comment / Uncomment line
|-
|-
|SHIFT + ALT + F
|Shift + Alt + F
|Format document
|Format document
|-
|-
|CTRL + SPACE
|Ctrl + Space
|Show suggestions
|Show suggestions
|}
|}
Zeile 96: Zeile 102:
!Action
!Action
|-
|-
|CTRL + #
|Ctrl + #
|Comment / Uncomment line
|Comment / Uncomment line
|-
|-
|SHIFT + ALT + F
|Shift + Alt + F
|Format document
|Format document
|-
|-
|CTRL + SPACE
|Ctrl + Space
|Show suggestions
|Show suggestions
|}
|}


== Terminal ==
== Terminal Shortcuts ==
{| class="wikitable"
{| class="wikitable"
|+
|+
Zeile 112: Zeile 118:
!Action
!Action
|-
|-
|CTRL + ö / CTRL + `
|Ctrl + ö / Ctrl + `
|Toggle terminal panel / Switch to terminal panel, if in editor
|Toggle terminal panel / Switch to terminal panel, if in editor
|-
|-
|CTRL + SHIFT + ö
|Ctrl + Shift + ö
|Create second terminal tab
|Create second terminal tab
|-
|-
|CTRL + L
|Ctrl + L
|Clear Terminal
|Clear Terminal
|-
|Ctrl + Shift + 5
|Split Terminal
|}
|}
== VSCode Configuration ==
If not specified otherwise in the following sections always go to Settings first or press <code>Ctrl + ,</code>.
=== Visibility in Explorer ===
Hiding or making files or folders visible is implemented with excludes in VSCode.
Go to section: '''Files:''' '''Exclude''' for all excluding options or specifically for '''Files Exclude.'''
=== Don't Show Suggestions ===
Section '''Editor: Quick Suggestions'''
Disable all for Intellisense. By CTRL + SPACE it can be show again
=== Don't Show Parameter Hover ===
Section: '''Editor > Parameter Hints: Enabled'''
=== Suggest Function Parameters with Parenthesis ===
Section: '''JavaScript > Suggest: Complete Function Calls'''
Activate: Complete functions with their parameter signature.
=== Disable File Switcher List on Ctrl + Tab ===
Open '''keybindings.json''' and add:<syntaxhighlight lang="json">
    {
        "other configurations" : "..."
    },
    {
      "key": "ctrl+tab",
      "command": "workbench.action.nextEditorInGroup"
    },
    {
      "key": "ctrl+shift+tab",
      "command": "workbench.action.previousEditorInGroup"
    }
]
</syntaxhighlight>
=== Indentations / Tab Size ===
For changing default tab size from 4 to 2 in Settings go to section:  '''Editor > Tab Size'''
Make sure to change it in all profiles or set it in user profile, click on the gear wheel and set to all profiles.
=== Formatting / Indentation for autoformatting Python with autopep8 ===
Go to section:  '''Extensions > autopep8'''
Add to args:
--indent-size=2
[[Kategorie:Development]]
[[Kategorie:Development]]

Aktuelle Version vom 27. Oktober 2024, 19:27 Uhr

Application Wide Shortcuts

Shortcut Action
Ctrl + Shift + P Command palette
Ctrl + , Open settings
Ctrl + Zoom in
Ctrl - Zoom out
Ctrl + K Ctrl + T Theme selector

Editor Shortcuts

Window Control

Shortcut Action
Ctrl + 1 Go to first editor panel
Ctrl + 2 / 3 Go to second / third editor panel, create one if not present
Ctrl + ^ Split editor panel
Ctrl + W Close file
Ctrl + Shift + T Reopen last closed file
Ctrl + Tab Next tab
Ctrl + B Toggle sidebar visibility

Navigation

Shortcut Action
Alt + ↑/↓ Move line up/down
Shift + Alt + ↑/↓ Duplicate line up/down
Ctrl + Shift + K Delete line
Ctrl + Z Undo

Multi Cursor Editing

Shortcut Action
Alt + Click Add cursor
Ctrl + D Multi-select word
Ctrl + Shift + Alt + ↑/↓ Add second cursor in the line above or below

Coding

Shortcut Action
Ctrl + # Comment / Uncomment line
Shift + Alt + F Format document
Ctrl + Space Show suggestions

File Management

Shortcut Action
Ctrl + # Comment / Uncomment line
Shift + Alt + F Format document
Ctrl + Space Show suggestions

Terminal Shortcuts

Shortcut Action
Ctrl + ö / Ctrl + ` Toggle terminal panel / Switch to terminal panel, if in editor
Ctrl + Shift + ö Create second terminal tab
Ctrl + L Clear Terminal
Ctrl + Shift + 5 Split Terminal

VSCode Configuration

If not specified otherwise in the following sections always go to Settings first or press Ctrl + ,.

Visibility in Explorer

Hiding or making files or folders visible is implemented with excludes in VSCode.

Go to section: Files: Exclude for all excluding options or specifically for Files Exclude.

Don't Show Suggestions

Section Editor: Quick Suggestions

Disable all for Intellisense. By CTRL + SPACE it can be show again

Don't Show Parameter Hover

Section: Editor > Parameter Hints: Enabled

Suggest Function Parameters with Parenthesis

Section: JavaScript > Suggest: Complete Function Calls

Activate: Complete functions with their parameter signature.

Disable File Switcher List on Ctrl + Tab

Open keybindings.json and add:

[  
    { 
        "other configurations" : "..." 
    },
    {
      "key": "ctrl+tab",
      "command": "workbench.action.nextEditorInGroup"
    },
    {
      "key": "ctrl+shift+tab",
      "command": "workbench.action.previousEditorInGroup"
    }
]

Indentations / Tab Size

For changing default tab size from 4 to 2 in Settings go to section: Editor > Tab Size

Make sure to change it in all profiles or set it in user profile, click on the gear wheel and set to all profiles.

Formatting / Indentation for autoformatting Python with autopep8

Go to section: Extensions > autopep8

Add to args:

--indent-size=2