Skip to main content

Configuring Vim

Install Neovim

Yes, choose Neovim rather than Vim. Neovim is a fork of Vim that’s more actively maintained and has a few extra features.

Follow the installation instructions for your operating system in the Neovim Wiki. For example, on a Mac:

$ brew install neovim

Create a starter configuration

The easiest way to get started with Neovim is to use a starter configuration (a.k.a. a Neovim distribution). This will give you a basic configuration that you can customize as you learn.

Here are a few popular starter configurations:

To learn how to install multiple starter configurations and switch between them, see Switching Configs in Neovim.

Otherwise, you can roll your own custom config using resources like these:

Improve your keymaps

  • Vim’s main feature is the ability to map any action to any keyboard shortcut you like
  • Experiment with changing some of yours so they make more sense to you
  • To enable a pop up that helps you complete your leader key maps, install which-key.nvim


Learn and iterate slowly

  • Take your time
  • It’s easy to get overwhelmed if you try to learn and update everything at once
  • Solve your pain points one-at-a-time and beware changing multiple things at the same time — if something’s broken, it‘ll be harder to figure out what to fix
  • Beware of copying in large chunks of configuration from other people’s dotfiles
    • It’s easy to end up with a configuration that’s hard to understand and maintain
    • It’s better to start with a minimal configuration and add to it as you learn

Configuring DAP

  1. Automatically install underlying system-level debuggers using mason-nvim-dap
  2. Install nvim-dap
  3. Configure nvim-dap
  • Adapter for each language
  • Configuration for each language
    • Support VS code launch.json files
  • Can install plugins that automatically configure the adapters and configuration per language
  1. Install nvim-dap-ui
  • Automatically show/hide when nvim-dap launches/quits a debugger
  1. Configure keymaps
  2. Customize breakpoint signs