Skip to content

VSCode

VSCode is a free open-source code editor developed by Microsoft. It has a built-in Git integration, debugging support, syntax highlighting, code completion, and more. It is available for Windows, macOS, and Linux.

VSCode is becoming the most popular code editor for software development and data science. It has a large number of extensions available for a wide range of languages and tools.

Installation

To install VSCode, go to the VSCode website and download the installer for your operating system.

VSCode Tutorials

Extensions

VSCode has a large number of extensions available for a wide range of languages and tools. You can browse and install extensions from within VSCode by clicking on the Extensions icon in the Activity Bar on the side of the window.

Some useful extensions for scientific software development include: - Python - R - Jupyter - Docker - Remote - Containers - Remote - WSL - Rainbow CSV - YAML

Configuration

VSCode has a large number of settings that can be configured to customise the editor to your preferences. You can access the settings by clicking on the gear icon in the bottom left of the window, or by pressing Ctrl + ,.

You can also configure settings for specific languages and tools by creating a settings.json file in the .vscode directory in your project.

Remote Development

VSCode has a number of extensions that allow you to develop code remotely on a different machine or in a container. This is useful if you are working on a machine with limited resources, or if you need to develop code in a different environment to your local machine.

The Remote-SSH extension allows you to connect to a remote machine over SSH and develop code on that machine. The Remote-Containers extension allows you to develop code in a container, and the Remote - WSL extension allows you to develop code in the Windows Subsystem for Linux.

To use VSCode for remote-ssh development follow the remote-ssh instructions.

Debugging

VSCode has built-in support for debugging code written in a number of languages. You can configure debugging settings in the .vscode/launch.json file in your project, and then start a debugging session by clicking on the Debug icon in the Activity Bar on the side of the window.

Version Control

VSCode has built-in support for version control with Git. You can view and commit changes to your code, and push and pull changes to and from a remote repository, all from within the editor.

Integrated Terminal

VSCode has an integrated terminal that allows you to run commands and scripts from within the editor. You can open the terminal by clicking on the Terminal icon in the Activity Bar on the side of the window, or by pressing Ctrl +.

Keybindings

VSCode has keyboard shortcuts that allow you to perform common tasks quickly and efficiently. You can view and customise the keybindings by clicking on the gear icon in the bottom left of the window, and then selecting Keyboard Shortcuts.

Themes

VSCode has many themes available that allow you to customise the appearance of the editor. You can browse and install themes from within VSCode by clicking on the gear icon in the bottom left of the window, and then selecting Color Theme.

Snippets

VSCode has a large number of snippets available that allow you to quickly insert code templates for common tasks. You can browse and install snippets from within VSCode by clicking on the gear icon in the bottom left of the window, and then selecting User Snippets.

Workspaces

VSCode has a feature called workspaces that allows you to group together related projects and open them all at once. You can create a workspace by clicking on the File menu, and then selecting Save Workspace As.

Further reading