keepcalculator

06 Numbers and Powers

Vim vs VS Code: Why I’m Learning to Program in Vim

Card No. 06·28263 · Updated · Standard formula, shown below

I’m learning to program in Vim instead of VS Code because Vim keeps my hands on the keyboard, makes text editing a composable skill rather than a menu hunt, and runs everywhere—from a Raspberry Pi to a remote server—without a heavyweight IDE. The trade-off is a steeper learning curve, but the payoff is speed, focus, and a tool that never gets in the way. This article explains the real reasons, the practical differences, and how to decide if Vim is right for you.

Background: What Vim Actually Is

Vim (Vi IMproved) is a text editor first released in 1991, itself an evolution of the Vi editor from 1976. It runs in the terminal, has no GUI by default, and is installed on virtually every Unix-like system, including Linux and macOS. VS Code, by contrast, is a modern graphical editor from Microsoft, first released in 2015, built on Electron (a Chromium-based framework), and it ships with a mouse-driven interface, integrated terminal, debugger, and a vast extension marketplace.

The core philosophical difference: VS Code is an IDE-like editor that tries to make everything discoverable through menus, icons, and tooltips. Vim is a modal editor—it has different modes for inserting text, manipulating text, and running commands—so the keyboard does almost everything. That modal design is the single biggest reason people switch, and also the biggest reason they give up.

How Vim’s Modal Editing Works

In Vim, you start in Normal mode, where keys perform actions on existing text, not insert new characters. For example:

  • dd deletes the current line
  • yy copies (yanks) the current line
  • p pastes after the cursor
  • w jumps forward a word, b jumps back
  • ci" changes everything inside the nearest double quotes
  • gg goes to the top of the file, G to the bottom

These commands compose: d (delete) + w (word) deletes a word; c (change) + i (inside) + } (block) replaces the contents of a curly-brace block. This composition is why Vim users talk about “text objects” and “operators”—you build complex edits from small, predictable pieces. VS Code also has keyboard shortcuts, but they are mostly fixed chords (Ctrl+Shift+K to delete a line, for instance) rather than composable grammar.

Why the Keyboard-Only Approach Wins for Me

The main reason I’m learning Vim is that my hands never leave the keyboard. In VS Code, even with shortcuts, I frequently reach for the mouse to click a tab, select a word, or scroll. Each reach costs a fraction of a second, but over a long coding session it adds up and breaks flow. Vim forces me to learn the fastest way to do every common edit, and after a few weeks, my fingers know the motions without conscious thought.

There is also a focus benefit. VS Code is full of distractions: the sidebar, the activity bar, the status bar, the marketplace, the notification bell. Vim’s default interface is just the text you’re editing. That minimalism reduces cognitive load, which is valuable when you’re deep in a complex refactor or debugging session.

Practical Differences: Speed, Extensions, and Remote Work

Let’s compare concrete aspects that matter day-to-day:

  • Startup time: Vim opens in under 100ms; VS Code takes 2–5 seconds on a typical laptop.
  • Memory footprint: Vim uses about 10–20 MB; VS Code often exceeds 500 MB with extensions.
  • Remote development: Vim runs natively over SSH; VS Code requires the Remote-SSH extension and a server component on the remote machine.
  • Extensions: VS Code has a huge marketplace (language servers, debuggers, themes). Vim has plugins (via vim-plug, Vundle, or native packages) but you configure them in a text file, not a GUI.
  • Learning curve: VS Code is usable immediately; Vim takes days to feel basic, weeks to feel fast, and months to master.

For modern language features like autocomplete and go-to-definition, Vim uses Language Server Protocol (LSP) through plugins like coc.nvim or vim-lsp. This gives you the same IntelliSense-style features as VS Code, but you configure them yourself. It’s not as turnkey, but it’s entirely possible.

Common Problems and How to Overcome Them

The most common complaint is “I can’t type!” because you open Vim and it doesn’t insert characters. That’s normal—you’re in Normal mode. Press i to insert, Esc to return. The second most common problem is forgetting commands. A practical fix is to keep a cheat sheet open in another terminal tab or use vimtutor, a built-in interactive tutorial (run vimtutor in your terminal).

Another hurdle is the default configuration. Plain Vim lacks line numbers, a status line, and syntax highlighting. Add these to your ~/.vimrc:

set number
set relativenumber
syntax on
set tabstop=4
set shiftwidth=4
set expandtab

If you want a more VS Code-like experience, try Neovim, a fork that adds modern features like built-in LSP and a terminal emulator. Many people start with Neovim and a distribution like LunarVim or NvChad to get a pre-configured setup.

How to Choose: Vim, VS Code, or Both

You don’t have to pick one forever. Many developers use VS Code for large projects and Vim for quick edits or remote work. Here’s a practical decision guide:

  • If you’re a beginner who wants to learn programming concepts quickly, start with VS Code—it removes friction.
  • If you spend hours in a terminal, edit config files on servers, or work over SSH, learn Vim basics.
  • If you want maximum speed and don’t mind configuration, invest in Vim or Neovim.
  • If you rely heavily on a debugger GUI or visual diff tools, VS Code is stronger out of the box.

My approach is to use VS Code when I need a full IDE (e.g., for a large Java project with a complex debugger) and Vim for everything else. The Vim skills transfer too—VS Code has a Vim extension that gives you modal editing inside the IDE, so you can get the best of both.

Frequently Asked Questions

Is Vim really faster than VS Code?

For pure text editing, yes, once you’ve learned it. Vim’s composable commands reduce the number of keystrokes for common operations. But for tasks like running a debugger or browsing a large codebase, VS Code’s GUI can be faster because it’s more discoverable. The speed difference is most noticeable in editing, not in overall workflow.

How long does it take to learn Vim?

You can be productive with basic editing in a few days. Real fluency—where you don’t have to think about the commands—takes 2 to 4 weeks of daily use. Complete mastery of advanced features (macros, registers, buffers) can take months, but you don’t need that to benefit.

Can I use Vim for modern languages like Python or JavaScript?

Yes. With plugins like coc.nvim or built-in LSP in Neovim, you get autocomplete, go-to-definition, hover info, and error highlighting. It requires more setup than VS Code, but it’s a well-trodden path with plenty of tutorials.

What is the best way to start learning Vim?

Run vimtutor in your terminal—it’s a 30-minute interactive lesson. Then start using Vim for small tasks: editing a config file, writing a quick script. Keep a cheat sheet handy. After a week, try using it for a full project. Avoid installing a huge plugin setup until you know the basics.

Is Vim worth the learning curve if I already know VS Code?

If you’re curious and willing to invest a few weeks, yes. Even if you return to VS Code, you can install a Vim emulation extension and gain the modal editing benefits. The skills are transferable, and the efficiency gains compound over a long career.

Does Vim work on Windows?

Yes. Vim runs natively on Windows, and Neovim works well too. You can also use Windows Subsystem for Linux (WSL) to run Vim in a Linux terminal. The experience is slightly less polished than on macOS/Linux, but it’s perfectly usable.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →