Visual Studio Code Tweaks on Windows 10
Visual Studio Code Tweaks on Windows 10
Integrated Terminal
Set Bash on Windows as default terminal environment.
To open the terminal, Use the Ctrl+` keyboard shortcut.
- open the command palate with
Ctrl+Shift+P
- type
open user setting
- search
bash
to locate the setting item - add
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\bash.exe"
toWORKSPACE SETTINGS
Work on WSL
DON’T modify any file of the WSL from Windows.
However, we can work on files in our Windows file system from either within the WSL or without. To sum it up:
File Location | Edit in Windows | Edit in WSL |
---|---|---|
Windows | Yes | Yes |
WSL | No | Yes |
- Windows file system does not include
C:\Users\{username}\AppData\Local\Packages\{CanonicalGroupLimited.UbuntuonWindows}\LocalState\rootfs
- WSL file system does not include
/mnt/[c, d, ...]
To make your life easier, put your work directory in Windows file system (e.g. /mnt/c/Users/{username}/Documents
).
This way, you can enjoy all the goodies from both Bash(Linux) and Windows, and edit your files from either environment.
Tricks
-
alias work='cd /mnt/c/Users/{username}/Documents/{work directory}'
code .
to open current directory in Visual Studio Code
WSL Git
not supported yet:(