๐ Visual Studio Code Essentials as IDE
Tags: VS Code Linux Installation, VS Code Extensions, VS Code Shortcuts
๐ฏ Purpose
Visual Studio Code is a free, powerful code editor (IDE) that helps you write, debug, and manage code for almost any programming language.
๐ฑ Origin
The name Visual Studio Code (VS Code) links it to Microsoftโs โVisual Studioโ developer tools, with โCodeโ added to distinguish it as a focused editor. The first stable version was released on April 2016.
๐ง Essentials
โ๏ธ Ubuntu Installation
# Follow the official installation guide https://code.visualstudio.com/docs/setup/linux
# Download VS Code installer and save it to /tmp/code.deb, use current URL from official website
wget -qO- https://go.microsoft.com/fwlink/?LinkID=760868 -O /tmp/code.deb
# Install VS Code
sudo apt install /tmp/code.deb
# Reload shell
exec $SHELL
# Verify VS Code version:
code -v
# To uninstall VS Code
sudo apt remove code; sudo apt purge code
# remove config files
rm -rf ~/.config/Code; rm -rf ~/.vsCode
# remove package metadata
sudo apt autoremove; sudo apt clean
๐ Useful VS Code shortcuts
- Keyboard Shortcuts (
Ctrl+K Ctrl+S): Show/update keyboard shortcuts - Command Palette (
Ctrl+Shift+P): Access all commands quickly. - File Navigation (
Ctrl+P): Jump to any file instantly. - Multi-cursor Editing (
Alt+Click): Efficient code changes. - Code Navigation: Go to definition (
F12), rename (F2). - Copy line up / down: (
Shift+Alt + โ / โ) - Integrated Terminal (
Ctrl+Shift+ยด): Run commands without leaving VS Code.
๐ Project & Source Control
- Explorer Sidebar: Navigate files and folders.
- Git Integration: Commit, push, pull, and branch handling directly in VS Code.
- .gitignore Management: Exclude files from version control.
๐งฉ Extensions (Key Ones)
- Prettier: Code formatting
โ configure as default formatter - ESLint: JavaScript/TypeScript Code Quality Tracker (linting)
โ see real time code warnings - Live Server: Instant frontend deployment & preview
โ open HTML-File in Browser. Code updates not visible in browser โ open HTML-File with live server. Code updates visible in browser - HTML/CSS/JS Support: Syntax highlighting, snippets, IntelliSense for efficient FE dev
- PlantUML: Diagrams Viewer
- Draw.io: Diagrams Viewer
- GitLens: Changes Tracker (what line of code, when, & why)
- REST Client: Test APIs directly from VS Code
๐งฐ Build-In Productivity Boosters
- IntelliSense: Autocompletion and documentation. see. https://code.visualstudio.com/docs/editing/intellisense
- Emmet: Fast HTML/CSS writing. see: https://code.visualstudio.com/docs/languages/emmet
All cheat sheets are taken from our Udemy Online Course. Interested? Check out:
All-In-One Full Stack DevOps - From Idea to Cloud