Ben Chuanlong Du's Blog

It is never too late to learn.

Tips on Visual Studio Code

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

A MS brading/telementry/licensing free edition named vscodium is available.

Tricks & Traps

  1. It seems that Visual Studio Code installed using snap in Kubuntu 18.10 has issues. It is suggested that you install Visual Studio Code using the .deb package instead of snap.

Fix the Caps Lock Mapping to Escape Issue

https://github.com/Microsoft/vscode/wiki/Keybinding-Issues

A simple fix is to add the following configuration into the user's setting.json file.

{
    "keyboard.dispatch": "keyCode"
}

Snippets

Snippets in Visual Studio Code

Extensions

Please refer to Useful Visual Studio Code Extensions .

Change Indention/Shift Width

https://stackoverflow.com/questions/34174207/how-to-change-indentation-in-visual-studio-code/45671704

Launching VS Code from Command Line on Mac

https://code.visualstudio.com/docs/setup/mac#_launching-from-the-command-line

Shortcuts

Shift + CMD + V: Switch between view mode of Markdown. You can use it to open Markdown preview in VS Code.

Command + J: Show/Hide the terminal panel.

Ctrl + Command + F: Enter/Exit full screen mode.

Ctrl + Click: Togger menu on a variable (which contains Peek definition) Ctrl + Alt + Click: variable definition

Descrption Shortcut
Windows Mac Linux
Format code shift + alt + f shift + option + f ctrl + shift + i

Auto Refresh Opened Files on Change

https://github.com/Microsoft/vscode/issues/28432

https://stackoverflow.com/questions/36333117/refresh-visual-studio-code-list-of-files/36338358

References

Comments