Great tutorial: https://code.visualstudio.com/docs/editor/codebasics
Ctrl + P
- search for symbolsCtrl + Shift + P
- open command palette
- format document
Shift+Alt+F
- Format the entire active file. - format selection
Ctrl+K Ctrl+F
- Format the selected text.
Ctrl + Shift + Enter
- insert line aboveCtrl + Enter
- insert line belowCtrl + Shift + K
- delete lineCtrl + Shift + L
- highlight all occurrencesCtrl + D
- highlight next occurrenceCtrl + C
- copy line without highlighting it firstAlt + Up/Down arrow
- move line up/downAlt + Shift + Up/Down arrow
- duplicate line up/down
Add f
and remove !
from the example with multicursor (Ctrl + Alt + Up/Down
on Windows.)
Also Ctrl + Click
. (Toggle MultiCursor modifier command).
Trim trailing whitespaces.
vals = (-5, 10, 55, 12, -7, 11, 22)
print('minimum je: {min(vals)}!')
print('maximum je: {max(vals)}!')
print('pocet prvkov je: {len(vals)}!')
print('suma je: {sum(vals)}!')
Swap the occupation & last name columns.
first name occupation last name
John gardener Doe
Roger driver Roe
Paul teacher Novak
Jane accountant Smith
Lucia programmer Dorak
Robert soldier Williams
The commands palette is started with Ctrl + Shift + P
.
Common useful commands:
- Trim Trailing Whitespace
- Help: Welcome
- Developer: Reload window
- Python: Select Interpreter
- Preferences: Color Theme
- Rewrap
- Hex editor
- file-icons
- TabOut
- SQLite viewer
- REST Client
"editor.rulers": [
80
],
"editor.renderWhitespace": "all",
"editor.cursorSmoothCaretAnimation": "on",
"terminal.integrated.defaultProfile.windows": "Command Prompt",
"terminal.integrated.enableMultiLinePasteWarning": false,
"editor.stickyScroll.enabled": false,
"editor.fontFamily": "'JetBrains Mono', Consolas, 'Courier New', monospace",
"editor.multiCursorModifier": "ctrlCmd",
"editor.suggest.insertMode": "replace",
"workbench.editor.pinnedTabSizing": "compact",
"editor.occurrencesHighlight": "off",
"workbench.iconTheme": "file-icons",
"workbench.editor.enablePreview": true,
"explorer.autoReveal": true,
"workbench.tree.indent": 12,
"emmet.triggerExpansionOnTab": true,
"workbench.tree.renderIndentGuides": "onHover",
"editor.fontSize": 13,
Create client.http
file.
get http://webcode.me/words.txt
get http://webcode.me/users.csv
get http://webcode.me/users.json
get http://webcode.me/users.xml
get http://webcode.me/thermopylae.txt
get http://webcode.me/os.html
get http://webcode.me/countries.html