Notes on using VS Code for development

Been seeing more folks mention VS Code so I finally gave it a try. Great experience so far.

Code (or @code as its known on Twitter) fills a space between text editors like Sublime or Atom and full-scale IDE’s like PHPStorm. It’s another of Microsoft’s latest attempts to be more developer-friendly (see also: Xamarin).

The app features five main components:

  • Explorer, your basic file nav & editor. Plus here was the most functional new folder/new file & re-organization drag and drop I’ve seen in a text editor.
  • Git, yes that’s right, a full-featured git client in the app. Easy staging and I’ve already found it’s improved how atomic my commits are. (The lazy appeal of git add . seducing me no longer.)
  • Debug, the heart of VS Code as an IDE.
  • Search, your standard multi-file power search tool.
  • Extensions, just what it says on the tin.

I wanted to share my setup in case others are interested in trying Code.

Extensions

Align – Lines up declarations within a code block.

var test = 'string';
var another = 10;
var small = 10 * 10;

Into:

var test    = 'string';
var another = 10;
var small   = 10 * 10;

ESLint – Run eslint from an .eslintrc on save or type.

Git Project Manager – Easily switch between git projects.

gitlink – Right click for Github link to file.

Instant Markdown – See side-by-side previews of markdown as you’re writing.

JestBuilt-in support for Facebook’s JS test rig.

PHPDebug – Adds PHP support to Debug tool. Note: for this extension, I had to do a little extra customization of setting my breakpoint function in the app. See screenshot to the right.

PHPCS – Inline PHP code sniffing based on whatever standards you choose.

PHPUnit – Some sugar for running PHPUnit tests. Works best with a key binding to test the current file.

Sort Lines – Good for organizing a package.json list.

VS Code Icons – Makes my editor look hella cool. Check out those sweet icons.

As for theme, I have been using Solarized Light for a while now. If you have the means (it’s free), I highly suggest you pick one up (download that ish).

A few other things I really like

  • Did I mention the Git editor?
  • Built-in terminal that supports ZSH, and I could even setup my powerline Menlo font for that cool terminal goodness. 
  • No crashes (so far).
  • Feels fast.
Posted Jan. 25 2017, 9:34 am by davis