Switching to VSCode from Sublime Text

blog/cards/switching-to-vscode-from-sublime-text.jpg

Here's a list of extensions and settings that I've configured to get me to the point where I was comfortable uninstalling Sublime Text.

Quick Jump: VSCode Pros and Cons | VSCode Extensions | VSCode Settings

Anyone who knows me knows that I’m a huge fan of Sublime Text. I’ve been using it for years for full time code development and writing.

But I would also consider myself to be a pragmatic programmer with very little brand loyalty. That means when something new or better comes along, I tend to have very little emotional attachments and jump ship.

With that said, it’s been about 8 months since I last tried VSCode so I thought I would try it out again. To my surprise I uninstalled Sublime Text 3 after about 5 hours and have been happily using VSCode for the last month.

To take an editor I’ve been using for many years and just throw in the garbage as if it were moldy pizza crust is a pretty big deal, but I switched because the pros out weighed the cons.

VSCode Pros and Cons

When it comes to using a code editor, there are a number of things you can judge it on such as performance, stability, looks, feel and its extensibility.

Performance

Without a doubt Sublime Text is faster. It starts up almost instantly and VSCode takes around a solid 1.5 seconds to start on an SSD with an i5 3.2GHz CPU.

However, once both applications are up and running I can’t say that VSCode is much slower than Sublime Text for the projects I work on. The largest applications I work on tend to have hundreds of files and tens of thousands of lines of code and moving around files feels very good in both editors.

I do run Windows 10 and the input delay when typing inside VSCode is not that much slower than typing in Notepad or an Explorer window so I would say that’s very good.

CTRL+P searching is slightly slower in VSCode but it’s not slow enough where it’s annoying or getting in the way. It’s something you can totally deal with – at least at the scale of my projects.

I’m sure Sublime Text would smoke VSCode on very large files but honestly, I simply don’t edit huge 5mb+ files in my code editor. For that I would typically filter it down and inspect it with grep, less and other Unix tools.

Verdict

On paper Sublime Text is faster but in practice for most every day web development tasks VSCode is absolutely fast enough where you won’t even be thinking about performance.

Stability

There’s not much to say in this category because I found both editors to be very dependable. I’ve put in monster coding sessions (10+ hours) on both editors and didn’t notice any crashes or slowdowns over time.

Of course VSCode uses more memory, so I guess in theory there’s more surface area for crashes to occur but I haven’t personally seen this happen.

Also, I was running the stable version of Sublime Text and the Insiders version of VSCode.

Verdict

Both editors are stable. It’s another non-issue.

Looks

Sublime Text looks pretty decent but it’s starting to show its age. Plus, one of its biggest weaknesses is you can’t customize critical areas of its UI.

For example, you can’t even get the default sidebar to render on the right side of the editor.

Sublime Text is outmatched here. VSCode looks very modern and you can customize every little nook and cranny of its UI.

Verdict

VSCode wins today and will certainly win in the future.

Feel

To me “feel” is how the editor reacts to certain things. For example, does the auto-indenting and execution of snippets work naturally? How about dealing with split window panes and navigating code bases?

There’s a million little things that add up to a good or crappy experience.

VSCode feels super awesome for day to day coding and writing markdown blog posts. Its indentation, snippet execution and bracket matching simply work and don’t get in your way.

The only thing I don’t like is how split windows are dealt with. Sublime lets you define a layout and no matter what, it would always keep your split layout available even if no files were open in the split pane.

With VSCode, if you split your editing windows in half and close one of the files, then the split would disappear. I personally much preferred the Sublime way of doing it but all in all, it’s not the end of the world.

It’s also worth mentioning I can fit 3x 80 character code windows and the sidebar on both editors with a Dell UltraSharp U2515H 2560x1440 monitor at native scaling.

Verdict

I can’t say that I had huge problems with either editor but I feel like VSCode handles indentation better and just feels more out of the way.

Extensibility

Both editors have the concept of extensions and plugins. VSCode uses Javascript and Sublime Text uses Python for developing these extensions.

You can discover Sublime Text packages on the Package Control website and you can discover VSCode extensions on its marketplace.

I find the VSCode marketplace to be a better experience, especially with how its integrated directly in the editor. You can very easily see an extension’s popularity, reviews, etc. straight from the editor.

I always found myself having to leave Sublime Text to research packages, but not so much with VSCode. Microsoft has done an amazing job here at searching and evaluating extensions.

Both editors have a huge amount of extensions to choose from so I’m sure you won’t have trouble finding extensions for whatever languages and tech stacks you work with.

Verdict

VSCode wins for me because it makes it easier to discover high quality extensions but at the end of the day both editors have a lot of extensions to choose from.

VSCode Extensions

Now for the good stuff. Which extensions should you install?

Well, that depends on what languages you work with. I mostly develop Flask and Ruby on Rails applications through Docker. I also do a ton of writing with Markdown.

Here’s the extensions I have installed:

blog/vscode-extensions-for-web-developers.jpg

Most of the above extensions are self explanatory but here’s a recap on a few of them:

  • Cobalt2 looks like this (but I don’t use Wes’ obnoxious font).
  • Docker is slick. It has autocomplete for the Dockerfile and docker-compose.yml files.
  • Docker Linter is awesome. It lets you lint your Python / Ruby code inside of Docker.
  • Partial Diff looks amazing and makes it so easy to see file diffs.

You can install any of those extensions by searching for them on the marketplace.

VSCode Settings

The settings boil down to no minimap, sidebar on the right side of the screen, subtle whitespace characters, trailing new lines on save and I tell VSCode to use the WSL terminal:

{
    "editor.minimap.enabled": false,
    "editor.mouseWheelZoom": true,
    "editor.rulers": [80],
    "editor.tabSize": 2,
    "editor.renderWhitespace": "boundary",
    "files.associations": {
        "*.erb": "erb"
    },
    "files.exclude": {
        "**/.git": true,
        "**/.svn": true,
        "**/.hg": true,
        "**/CVS": true,
        "**/.DS_Store": true,
        "**/_site": true,
        "**/tmp": true,
        "**/*.pyc": true,
        "**/*.asset-cache": true,
        "**/*.jekyll-cache": true,
        "**/*.tweet-cache": true,
        "**/__pycache__": true,
        "**/node_modules": true,
        "**/bower_components": true
    },
    "files.insertFinalNewline": true,
    "files.trimFinalNewlines": true,
    "files.trimTrailingWhitespace": true,
    "telemetry.enableTelemetry": false,
    "terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\bash.exe",
    "terminal.external.windowsExec": "C:\\WINDOWS\\System32\\bash.exe",
    "workbench.colorTheme": "Cobalt2",
    "workbench.sideBar.location": "right",
    "workbench.startupEditor": "newUntitledFile"
}

I’m really enjoying VSCode!

Who would have thought. Back in 1997 I was writing code in VB6 on Windows 95 and 20 years later I’m using Windows 10 with WSL + Docker + VSCode to develop Linux based applications on Windows (and loving it).

What VSCode extensions are you using? Let me know in the comments below.

Never Miss a Tip, Trick or Tutorial

Like you, I'm super protective of my inbox, so don't worry about getting spammed. You can expect a few emails per month (at most), and you can 1-click unsubscribe at any time. See what else you'll get too.


Comments