Skip to main content

Moving to Neovim

· 4 min read
Daniel Ruf
Full Stack Developer

The growing complexity of IDEs has led me to make a shift in a different direction.

When I had my first own computer in the 1990s, the first tool that I used to write code was the editor Notepad, which came preinstalled with Windows. The only thing I needed was my creativity and a bit of knowledge from different books.

Windows Notepad was my preferred tool for creating my websites for a long time. After a few years, I switched to Notepad++ for writing code and editing large files and still kept using it in my first jobs as a developer. Especially the complex regular expression support, the vast language support, the multiline tools, and the extensibility of Notepad++ were features that I loved.

Since then, I have tried different editors like Brackets and Atom, which I have also used at work. Also, Eclipse and other IDEs based on Eclipse (like Android Studio) were used in some projects.

Personally, I was never a big fan of rather complex and resource-intensive IDEs like PhpStorm (that supports almost any programming language and not just PHP). But after some years, I became part of bigger developer teams, where it was standard to use PhpStorm, and every developer had got a laptop preinstalled with PhpStorm.

The underlying Java platform of PhpStorm was a real problem when we were working on bigger projects, and this is still one of the problems today. For me, it meant more time to solve problems with the IDE than writing code.

Around 2017 I switched to Visual Studio Code by Microsoft as my primary IDE. With a focus on a bare minimum set of features, a lightweight setup, and a big ecosystem of extensions like GitLens, it quickly became the standard IDE for many colleagues and me.

Until today, PhpStorm and Visual Studio Code are the two most used IDEs, that are used in many developer teams. Visual Studio Code also replaced PhpStorm on my personal laptop.

But after some time, I felt the need to go back some steps, to use what I already know and what I have available on most systems with fewer resources. And one of the solutions was Vim (or vi improved). For working on single files and taking a quick look into the contents of zip files, it felt right.

Learning Vim shortcuts to efficiently work with files was not a problem, I can learn the needed commands step by step. It is also very helpful to keep working in the terminal. But there were a few small long-standing problems in Vim, that made things harder than they should be.

This is where Neovim (nvim) comes into play. It basically takes Vim and makes it better. The description of the vision behind Neovim was the final motivation to install it.

Neovim is a refactor, and sometimes redactor, in the tradition of Vim (which itself derives from Stevie). It is not a rewrite but a continuation and extension of Vim. Many clones and derivatives exist, some very clever—but none are Vim. Neovim is built for users who want the good parts of Vim, and more.

Goals

Extensible. Usable. Vim.

  • Retain the character of Vim—fast, versatile, quasi-minimal.
  • Enable new contributors, remove barriers to entry.
  • Unblock plugin authors.
  • Deliver a first-class Lua interface, as an alternative to Vimscript.
  • Leverage ongoing Vim development.
  • Optimize "out of the box", for new users but especially regular users.
  • Deliver a consistent cross-platform experience, targeting all libuv-supported platforms.
  • In matters of taste/ambiguity, favor tradition/compatibility...
  • ...but prefer usability if the benefits are extreme.

Non-goals

  • Support Vim9script
  • Turn Vim into an IDE
  • Limit third-party applications (such as IDEs!) built with Neovim
  • Deprecate Vimscript
  • Conform to POSIX vi

Neovim is currently my default tool to work with code on my private laptop. Building the perfect setup will take some time. Focusing on the code and remembering some special keystrokes is all I need to get things done. For me, this feels much better compared to a complete IDE with a graphical user interface. It's fast, efficient, and doesn't get in the way.

Further helpful resources around Vim and Neovim: