Skip to content

VS Code

VS Code is a free integrated development environment (IDE) by Microsoft which supports development in most popular programming and scripting languages. The editor provides a large range of free and paid software integrations and plugins and provides cross-platform support for coding on Windows, Mac and Linux systems.

Personal Experience

I use VS Code extensively for coding in Python, Jupyter Notebooks, C# and JavaScript. I find the Docker integration and wide range of other plugins extremely helpful for boosting my productivity.

Tools & Software Integrations

  • Docker Extension - The Docker extension makes it easy to build, manage, and deploy containerized applications from Visual Studio Code. It also provides one-click debugging of Node.js, Python, and .NET Core inside a container.
  • GitHub Pull Requests and Issues - This extension allows you to review and manage GitHub pull requests and issues in Visual Studio Code.
  • Data Wrangler - Data Wrangler is a data exploration and cleaning tool that is integrated into VS Code and VS Code Jupyter Notebooks. The tool's user interface shows statistics and visualisations for each column in the dataset and automatically generates Pandas code for each step in the data cleaning process. Data transformations undertaken in Data Wrangler are non-destructive with regard to the source dataset.
  • GlassIt-VSC - A VS Code extension to set window to transparent on Windows and Linux platforms. Transparency is increased by pressing ctrl + alt + z, decreased by pressing ctrl + alt + c, or maximized by pressing ctrl + alt + x. The plugin is used to reveal the desktop or other windows hidden beneath the editor.
  • Jupyter Extension - A VS Code extension that provides basic notebook support for language kernels that are supported in Jupyter Notebooks. Require the Python language extension. This requires installation of the Python extension.
  • Live Server - This extension enables you to launch a local development server with live reload feature for static & dynamic pages with the click of a button.
  • Material Icon Theme - VS Code extension which replaces the default icons with Material Design Icons.
  • Python Extension - A VS Code extension with rich support for the Python language including features such as IntelliSense with Pylance, linting, debugging, code navigation, code formatting, refactoring and a variable explorer.
  • Rainbow CSV - A tool which helps working with CSV files by highlight columns in comma (.csv), tab (.tsv), semicolon and pipe separated files in different colours. In addition to a number of helpful functions it also provides the ability to transform and filter tables using a built-in SQL-like query language.
  • Remote - Containers - This extension lets you use a Docker container as a full-featured development environment. It enables you to develop on the same operating system you deploy to by working in the container. Workspace files can be mounted into the container from the local file system, or copied or cloned into it once the container is running.
  • Remote - SSH - This extension lets you open any folder on a remote machine using SSH and use that machine as your development environment.
  • TODO Highlight - This extension highlights annotations like TODO and FIXME within code so they can be more readily distinguished from other comments and code.

Resources

Notes and Trobleshooting

Activating Anaconda Environment in VS Code

Source: https://stackoverflow.com/questions/43351596/activating-anaconda-environment-in-vscode

  1. Press 'shift + cmd + P' on keyboard.
  2. Search for 'Select Interpreter' in the command dropdown.
  3. Select 'Python: Select Interpreter' to display the list of Python virtual environments.
  4. select the environment you want to use.

NOTE: Selecting an interpreter from the list adds an entry for python.pythonPath with the relevant path to the interpreter inside your VS Code Workspace Settings.

Compare the contents of two files

  1. Open both the files in VS Code.
  2. From the left Explorer panel, right-click the first file and choose Select for Compare from the right-click menu.
  3. Select a file to compare.
  4. Then right-click the second file and choose Compare with Selected.
  5. Select another file to compare.
  6. Both files will be opened side by side in inline view mode.

Source: https://vscode.one/diff-vscode/