Getting started with VS Code

Learn to install and use VS Code

Featured image

For nearly two years, I relied on Sublime Text for all my coding needs, whether working with C/C++ or Python. It remains my go-to text editor for quick edits due to its lightweight and user-friendly nature. However, as I began working with larger codebase and developing my own SDKs, I decided to make the switch to Visual Studio Code (VS Code).

Though I had always intended to use VS Code, I hadn’t made the transition until recently. After six months of using it, I can certainly see why it’s so popular. The extensive range of extensions and their seamless integration into the software significantly enhance the development experience.

This blog isn’t about comparing Sublime Text and VS Code but rather about acknowledging the impressive features of VS Code. I’ll walk you through how to install and set up VS Code the way I prefer. I welcome any suggestions you might have, so feel free to leave a comment below!

You can refer to following video for better understanding:

Install VS Code

Head to download page and download the software for your OS. In this tutorial I have used Windows but the steps will be similar for other OS.

VS Code Extensions:

1) Python

A Visual Studio Code extension with rich support for the Python language (for all actively supported versions of the language: >=3.7), including features such as IntelliSense (Pylance), linting, debugging, code navigation, code formatting, refactoring, variable explorer, test explorer, and more!

2) C/C++

The C/C++ extension adds language support for C/C++ to Visual Studio Code, including features such as IntelliSense and debugging.

3) C/C++ Extension Pack

Popular extensions for C++ development in Visual Studio Code.

4) CMake

This extension provides support for CMake in Visual Studio Code.

5) CMake Tools

CMake Tools provides the native developer a full-featured, convenient, and powerful workflow for CMake-based projects in Visual Studio Code.

6) Code Spell Checker

A basic spell checker that works well with camelCase code.

The goal of this spell checker is to help catch common spelling errors while keeping the number of false positives low.

7) Code Runner

Run code snippet or code file for multiple languages: C, C++, Java, JavaScript, PHP, Python, Perl, Perl 6, Ruby, Go, Lua, Groovy, PowerShell, BAT/CMD, BASH/SH, F# Script, F# (.NET Core), C# Script, C# (.NET Core), VBScript, TypeScript, CoffeeScript, Scala, Swift, Julia, Crystal, OCaml Script, R, AppleScript, Elixir, Visual Basic .NET, Clojure, Haxe, Objective-C, Rust, Racket, Scheme, AutoHotkey, AutoIt, Kotlin, Dart, Free Pascal, Haskell, Nim, D, Lisp, Kit, V, SCSS, Sass, CUDA, Less, Fortran, Ring, and custom command

8) GitHub Pull Requests and Issues

This extension allows you to review and manage GitHub pull requests and issues in Visual Studio Code. The support includes:

9) GitLens — Git supercharged

GitLens supercharges Git inside VS Code and unlocks untapped knowledge within each repository. It helps you to visualize code authorship at a glance via Git blame annotations and CodeLens, seamlessly navigate and explore Git repositories, gain valuable insights via rich visualizations and powerful comparison commands, and so much more.

10) GitHub Repositories

The GitHub Repositories extension lets you quickly browse, search, edit, and commit to any remote GitHub repository directly from within Visual Studio Code.

11) Remote - SSH

The Remote - SSH extension lets you use any remote machine with a SSH server as your development environment. This can greatly simplify development and troubleshooting in a wide variety of situations.

12) ROS

The Visual Studio Code Extension for ROS provides support for Robot Operating System (ROS) development for ROS1 and ROS2 on Windows and Linux.

13) Jupyter

A Visual Studio Code extension that provides basic notebook support for language kernels that are supported in Jupyter Notebooks today. Many language kernels will work with no modification. To enable advanced features, modifications may be needed in the VS Code language extensions.

14) Jupyter Keymap

This extension provides keymaps for notebooks in Visual Studio Code to match the keybindings in Jupyter Notebook. This extension comes with the Jupyter extension for Visual Studio Code and can be disabled or uninstalled.

15) Doxygen Documentation Generator

This VS Code Extensions provides Doxygen Documentation generation on the fly by starting a Doxygen comment block and pressing enter.

Terminal

You can open terminal using CTRL + `

You can choose between different terminal options you have and also rename the terminal names.

Github Integration

You can sign in with github account as well to link your VS Code settings as well as make changes to your repositories from VS Code itself.