Setting up the Visual Studio Code Text Editor

Posted in administration programming with tags golang javascript python ruby -

Summary

Notes on customizing the Visual Studio Code text editor.

Installing Visual Studio Code

Installing Code on macOS

To install Visual Studio Code on macOS with Homebrew, enter this command in a terminal window:

brew cask install visual-studio-code

Installing Visual Studio Code to a USB Drive

To run Visual Studio Code directly from a USB device, without installing it on the computer, use portable mode.

The EDITOR Environment Variable

Remember to set the EDITOR environment variable in your shell profile, so that this editor is automatically invoked by command-line tools like your version control system.

To make Visual Studio Code your default editor, use this line:

export EDITOR="code -w"

Setting up Collaborative Editing with Live Share

Use the Live Share service for collaborative editing between copies of Visual Studio and Visual Studio Code.

Disabling Telemetry

Visual Studio Code enables telemetry by default, and connects to remote services for various features. The FAQ explains how Code complies with the GDPR.

To disable telemetry and crash reporting, set these options in Preferences > Settings:

"telemetry.enableTelemetry": false,
"telemetry.enableCrashReporter": false

Extensions

Extensions for Writing

Extensions for Software Development

Visual Studio Code includes support for JavaScript, TypeScript and Node.js. To add support for other programming languages, install the extension for the languages that you would like to use.

Run this command to add the Python extension:

code --install-extension ms-python.python

You will need to install some additional tools into the environment to use all of the features of this extension.

Run this command to add the Go extension, which turns Code into a development environment for Go:

code --install-extension ms-vscode.go

The Go extension will automatically download and configure all of the tools that it needs.

Run this command to add the Ruby extension:

code --install-extension rebornix.ruby

You will need to install some additional tools into the environment to use all of the features of this extension.

Useful Extensions for Web Development

Useful Extensions for Operations

Resources