Skip to content

VS Code Installation and Configuration

VS Code Logo

Visual Studio Code (VS Code) is a popular code editor that provides a rich set of features and extensions for various programming languages. To install VS Code, follow the instructions for your operating system:

Install Visual Studio Code

  1. Download Visual Studio Code from the official download page.
  2. Run the installer and follow the on-screen instructions to complete the installation process.
    • For windows, run the installer and follow the prompts. Make sure to check the option to add VS Code to your PATH for easier command line access.
    • For macOS, open the downloaded .dmg file and drag the VS Code icon to the Applications folder.
    • For Debian/Ubuntu Linux, follow the instructions for your specific distribution on the download page.
    • For Arch Linux, paru -S visual-studio-code-bin is the recommended way.

Create a dev directory

After installing VS Code, it's a good idea to create a dedicated directory for your development projects. You can create a dev directory in your home folder to keep all your projects organized. Open a terminal and run the following commands:

sh
mkdir ~/dev
cd ~/dev

TIP

You can use your file explorer to create the dev directory if you prefer a graphical interface. Just make sure to remember the location for later use when opening projects in VS Code.

Afterwards, create a new folder for each project you want to work on within the dev directory. For example, you can create a folder named usaco for your USACO projects:

sh
mkdir usaco
cd usaco
code .

code . will open the current directory in VS Code, allowing you to start working on your project immediately.

Extensions

VS Code supports a wide range of extensions that enhance its functionality. To install extensions:

  1. Open VS Code.
  2. Click on the Extensions icon Extensions Icon in the Activity Bar on the side of the window (or press Ctrl+Shift+X).
  3. Search for the following extensions you need
  4. Click the "Install" button for each extension you want to add.

USACO

  • Python: If you intend to use Python
  • Black Formatter: For automatic code formatting in Python
  • C/C++ Extension Pack: If you intend to use C++
  • Code Runner: Run code snippets or files directly in the terminal

WEB

  • Tailwind CSS IntelliSense: Provides autocompletion and linting for Tailwind CSS classes.
  • ESLint: Integrates ESLint into VS Code for JavaScript and TypeScript linting.
  • Prettier - Code formatter: Automatically formats your code according to a consistent style.
  • Fold Level: Allows you to fold code blocks based on their indentation level, which is especially useful for HTML and CSS files.
  • Svelte for VS Code: Provides support for Svelte development, including syntax highlighting and snippets. (If you are using Svelte)

Snippets

TBA