Visual Studio Code

Install from snap repository

# install
sudo snap install code --classic

Install from APT repository

# deb download
# https://code.visualstudio.com/docs/setup/linux
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
 
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install code # or code-insiders
 
# manual download
wget -q https://update.code.visualstudio.com/latest/linux-deb-x64/stable -O /tmp/code.deb
sudo dpkg -i /tmp/code.deb
 
# create starter
cat << EOF> /usr/share/applications/code.desktop
[Desktop Entry]
Name=Visual Studio Code
Exec=/snap/bin/code %U
Icon=/snap/code/current/usr/share/pixmaps/com.visualstudio.code.png
Type=Application
StartupNotify=false
Categories=Utility;TextEditor;Development;IDE;
Actions=new-empty-window;
EOF

Configure Visual Studio Code as default text editor

xdg-mime default code.desktop text/html
xdg-mime default code.desktop text/plain
xdg-mime default code_code.desktop text/plain # Ubuntu 19.10
 
# old
mkdir -p ~/.local/share/applications
cat <<EOF>> ~/.local/share/applications/mimeapps.list
[Default Applications]
text/plain = code.desktop
text/x-shellscript = code.desktop
EOF
 
sed -i 's|text/plain = .*|text/plain = code.desktop|g' ~/.local/share/applications/mimeapps.list

Keyboard shortcuts for Linux
https://code.visualstudio.com/shortcuts/keyboard-shortcuts-linux.pdf

Extensions
https://github.com/viatsko/awesome-vscode

Links
https://code.visualstudio.com/
https://stackoverflow.com/questions/34730585/how-can-i-commit-some-changes-to-a-file-but-not-others-in-vscode