This article is also available on iamdeveloper.com.
This originally was just a gist, but I thought it made sense to just convert it to a blog post.
As the stateofjs.com survey this year noted, Visual Studio Code is quickly becoming the editor of choice for many web developers.
Perhaps the most striking stat on the 2017 State of #JavaScript Survey: VS Code (@code) is by far the most popular editor - and it's only 2.5 years old!
— Cory House (@housecor) December 13, 2017
❤️ the new Microsoft.https://t.co/BwfJBHln4y pic.twitter.com/pd1GWQJB7X
VS Code is my editor of choice. It's great for web dev, and if you're developing with TypeScript, it's definitely the way to go. Fun fact... it's written in TypeScript. If you're interested in learning more about TypeScript, check out my blog post Consider Using TypeScript.
TypeScript is what gives VS Code its refactoring and intellisense capabilities. Here's the really cool part. You get typed intellisense even if you're not using TypeScript via Automatic Type Acquisition.
Alright, let's get to it. Here's my current Visual Studio Code setup.
Extensions permalink
VS Code has a huge array of extensions available on their marketplace. As well as extensions, in 2017, extension packs became available. tl;dr, they're a grouping of extensions.
Settings Sync is a must have extension and I recommend installing it as your first extension. With this extension, you'll be able to backup most of your settings to a private gist. From there, restoring your settings is pretty easy. It's great for backing up settings as well as synching settings, which is what I do between my work and personal laptop.
Node/JS permalink
- Node extension pack (must have)
- Import Cost
Formatting/Linting permalink
CSS permalink
Debugging permalink
Language extensions like Go and Python (see below) when installed get all the proper tooling set up to debug for those specific languages. Here's some others. The easiest way to get started with debugging is to press F5
and VS Code will offer you debugging configurations to get set up with.
Git permalink
- Git extension pack (must have)
- Git Blame
- gitflow
- Open in GitHub / Bitbucket / Gitlab / VisualStudio.com !
Unit Testing permalink
React permalink
Other Languages permalink
REPLs/Playgrounds permalink
- Quokka.js (check out Introducing Quokka...)
Viewers permalink
- Image Preview
- SVG Viewer
- View in Browser
- Update 2018/02/16: Polacode, not a viewer per se, but a great way to take beautiful images of code snippets.
Hey @syntaxfm, have you seen the new Polacode extension for @code? It's 🔥 https://t.co/lnWgxDq9Hu #vscode pic.twitter.com/cama1UWzh4
— Nick Taylor (he/him) (@nickytonline) February 16, 2018
DevOpsy Stuff permalink
Hack the Editor permalink
- Guides
- Custom CSS and JS Loader (currently used for the Cobalt 2 theme.)
Update 2018/01/28: The Custom CSS and JS Loader can also be used to get a kind of Operator Mono look by using two fonts. See the tweet below. I did run in to some issues though. The main one was that the CSS class names had changed. Just read the whole tweet thread for all the info.
Multiple Fonts: Alternative to Operator Mono in VSCode. #vscodetips https://t.co/dujI40zUAv
— VSCodeTips (@vscodetips) January 28, 2018
TLDR; check out https://gist.github.com/nickytonline/8086319bf5836797ee3dea802a77000d. (maybe another gist to blog post? 😉). And the end result is this. Not sure if I like the cursive in code yet, but maybe it'll grow on me.
Miscellaneous permalink
Themes permalink
Current Theme Setup permalink
I'm currently taking the Cobalt 2 theme for a spin with the Fish Shell Fisherman Agnoster theme.
I still love using the Dracula theme with the Fish Shell Fisherman Joker theme, but thought I'd switch it up for a bit.
I've also used One Dark Pro, and Material theme which are great as well.
Shell permalink
I use Fish Shell and Fisherman with the Agnoster theme right now.
Font permalink
I use Fira Code in VS Code. Once you've installed Fira Code, the setup in Code is quite easy.
Open your user settings and add the following:
// Controls the font family.
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
// Controls the font size.
"editor.fontSize": 14,
Boom! Bob's your uncle and you now have Fira Code in all it's awesome ligatureness (is that a word?).
Custom Key Bindings permalink
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "cmd+shift+z",
"command": "workbench.action.terminal.focus"
},
{
"key": "cmd+shift+a",
"command": "workbench.action.terminal.focusNext"
},
{
"key": "cmd+shift+s",
"command": "workbench.action.terminal.focusPrevious"
},
{
"key": "cmd+shift+x",
"command": "workbench.action.terminal.kill"
}
]
Also, if you're looking for great tips and tricks on Visual Studio code, check out www.vscodetips.com. One last thing that I'm really looking forward to is the availabilty of Live Share.
Questions or comments? Hit me up on Twitter.