Migrating from Sublime Text to Visual Studio Code
2 minutes read
I'm a frontend web developer at Rated People (RP). The team lets everyone use whatever tools they're comfortable with, so we all have different editors, and the company supports whatever setup we choose. When I joined in 2015 I got a PHP/WebStorm license, but I hardly used it and stuck with SublimeText because I knew it well. PHPStorm is a great IDE, to be clear.
I kept hearing good things about Visual Studio Code (vscode), on Twitter and from our team lead, Simon Delaney. Last weekend I was learning some advanced HTML5 Canvas, so I tried vscode for it.
I started on the Welcome screen, which has plenty to get you going.
"Interactive Playground" is the best place to start. It lets you try vscode's main features hands on.
"Interface Overview" comes next. It's an interactive tour of the editor's UI that shows you where the important options are.
"Keyboard Shortcuts Reference" gives you every shortcut as a printable PDF, which helps if you want to learn the vscode key bindings.
Coming from SublimeText or Atom, a lot will feel familiar, but some key bindings differ. For example, CMD/Ctrl + I expands the selection to the whole line instead of CMD/Ctrl + L. You don't have to relearn them, though. Search for "Import Keyboard Shortcuts" and install the extension for your old editor, whether that's SublimeText, Atom, PHPStorm, Emacs, Eclipse or vim.
You can install a theme too. I went with my favourite, Wesbos's Cobalt2 theme. Most themes include code formatting and styling, and they're easy to configure.
I also work with PHP and Symfony a lot, so I added a couple of extensions for PHP formatting and debugging. In total I needed fewer than a dozen extensions to get everything working the way it did in SublimeText. Emmet, Git, the debugger, the terminal and the console all come built in, which is a lot less work than my initial setup for SublimeText.
What I like most so far:
- Built-in support for things like jumping to an object's definition. Some languages, PHP included, need extra configuration for this.
- A built-in debug console, terminal and version control
- It's very fast ⚡
I'll stick with it for now and give SublimeText a well earned break. If you want to try it, download it from the Visual Studio website.
Happy programming!