Skip to main content

VS Code

The best, most entertaining and immortal topic in software engineering is back! Editor Wars!

After reading Roben Kleene’s blog post I realized that I’ve been using VS Code all-day every-day for over a year now. I’m not willing to admit it because in my mind I’m a die-hard (n)vim user, but the reality is this: VS Code is brilliant. Kleene makes many great points about key ingredients of VS Code’s success (popularity/MS backing, plugin ecosystem, client-server architecture), and you should read his post.

Then today I read about “modernizing” Emacs, and I saw the discussion on HN, and this comment in particular made me think:

I think VSCode is more than yet another editor, it’s more than what Textmate and Sublime were. There are two major reasons, I think.

First, it’s the plug-in ecosystem. Yes, Emacs and vim have had “plug-ins” for a long time, but VSCode makes discovery, installation and development of plug-ins much easier than anything I’ve come across (sans Atom perhaps). If I need to setup a new computer for coding, all I need to do is grab VS Code, click “install” on 4 plugins, and I’m ready to go. My only obligatory hand-crafted line of configuration is this:

"gitlens.currentLine.format": "${author} wrote that shitty piece of code ${ago}",

Compare that to hundreds of lines of my old init.el or even my current init.vim, and I start to see the appeal.

Second, it’s the client-server architecture. This is, surprisingly, a killer feature that made me finally abandon vim. Among many other things the client-server architecture of VS Code enables “devcontainers,” i.e., having a client on your local machine with its nice fonts and working suspend-to-RAM, but compiling and testing continuously on anything from a Docker/WSL container to a Linux host. Having to work with networking equipment I’m at the mercy of horrible router vendors (hello Cisco, Juniper and Arista! 👋 I hate you all!) and my software often depends on low-level libraries that really don’t work well on anything other than Linux. I need to work in containers all the time, and sometimes I need to work on a Linux host in a networking lab (hello Eve! 👋 I hate you too!). Being able to stick to the same UI, same extensions, same keyboard shortcuts, same everything, simply switching the backend is blissful. Of course I can run vim with all my plugins anywhere, I have a script that automates its installation (“Of course you do.”), but it’s a hassle, and VS Code is great at eliminating hassle.

Ok, there, I did it. I’ve been using Emacs for years, afterwards I’ve been using (n)vim for even more years, and now I’m praising an Electron-based Node.js monstrosity that is VS Code. I didn’t see it coming, but I know I’m not the only one.