Setting Up Visual Studio Code
hacking skills
Abstract
Guidance on setting up a fresh visual studio code installation.
Introduction
This is one of a series of posts where I document software configurations for personal reference. This post documents the configurations for Visual Studio Code.
Installation
Although vscode can be installed from Ubuntu software center, some issues (perhaps relating to dependencies) may arise and prevent input methods such as ibus and fcitx from working properly. To work around it, instal vscode using the packages provided by the official site: https://code.visualstudio.com/.
Extensions
shellcheck
:- In shell:
sudo apt install shellcheck
. - In vscode:
ctrl + p
->ext install timonwong.shellcheck
.
- In shell:
shell-format
:- Download shfmt executable binary, rename it as
shfmt
, save it to/usr/local/bin/
, and make it executable. - In vscode:
ctrl + p
->ext install foxundermoon.shell-format
.
- Download shfmt executable binary, rename it as
Remote Development
:- In vscode:
ctrl + p
->ext install ms-vscode-remote.vscode-remote-extensionpack
.
- In vscode:
plantuml
:- In shell:
sudo apt install default-jdk graphviz
. - In vscode:
ctrl + p
->ext install jebbs.plantuml
.
- In shell:
GitLens
:- In vscode:
ctrl + p
->ext install eamodio.gitlens
- In vscode:
pylance
:- In vscode:
ctrl + p
->ext install ms-python.vscode-pylance
- In vscode:
jsoncrack
:- In vscode:
ctrl + p
->ext install AykutSarac.jsoncrack-vscode
- In vscode:
Settings
Go to “Preferences” - “Settings” and change the following settings:
- Text Editor
- Tab Size:
2
- Word Wrap:
"on"
- Find
- Auto Find In Selection:
"multiline"
- Auto Find In Selection:
- Font
- Font Family:
'Ubuntu Mono', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'
- Font Family:
- Suggestion
- Accept Suggestion On Enter:
"off"
- Accept Suggestion On Enter:
- Files
- Auto Guess Encoding:
true
- Auto Guess Encoding:
- Tab Size:
- Workbench
- Color Theme:
"Solarized Light"
- Color Theme:
- Features
- Extensions
- Auto Check Updates:
false
- Auto Update:
None
- Ignore Recommendations:
true
- Auto Check Updates:
- Terminal
- Integrated: Cursor Blinking:
true
- Integrated: Enable Bell:
true
- Integrated: Scrollback:
10000
- Integrated: Cursor Blinking:
- Extensions
- Security
- Workspace
- Trust: Untrusted Files:
"open"
- Trust: Untrusted Files:
- Workspace
- Extensions:
- PlantUML configuration
- Export Sub Folder:
false
- Export Sub Folder:
- shell-format configuration
- Shellformat: Path:
"/usr/local/bin/shfmt"
- Shellformat: Path:
- PlantUML configuration
Keybindings
Go to “Preferences” - “Keyboard Shortcuts” and change the following shorcuts:
- Reindent Selected Lines:
Ctrl
+Shift
+I
- Toggle Line Comment:
Ctrl
+Shift
+C
- Terminal: Run Selected Text In Active Terminal:
Ctrl
+Enter