Mastering Neovim

So you have made the decision to jump into Neovim and you are looking for a place to get started. Like any new skill, learning the first few basics might seem challenging and awkward, but once you get past them you will become proficient with Neovim in no time. The important thing to remember is that mastering Neovim is more of a marathon than a sprint - avoid the temptation to install a long list of popular plugins until you have learned the basics.

We generally recommend that new users follow a simple progression, which we have used as the basis for organizing our Neovim content:

Start with the Fundamentals

Getting to know any new topic often requires learning some new concepts and "finding their way around", and Neovim is no different. As a "modal" editor, Neovim works a bit differently than many new users might be used to. Spend some time learning Neovim's different modes, how they work, and how to switch between them.

Next, spend some time learning about Neovim's buffers and windows, which make up the main user interface that you will interact with. Get to know what they are, how they are different, and how to use them. Finally take a look at tabs to get to know what they are and how they might be used. We find that some of the most opinionated aspects of Neovim are how each user chooses to organize work between buffers, windows, and tabs, so getting to know them and understand how to use them will help you develop a workflow that works the best for your personal editing style.

At this point it can be helpful to get a basic introduction to Neovim's vast selection of commands, how to use them, and how to apply them to ranges of text of entire buffers. While you may not learn many of these commands for while, this can provide a good overview of the scope of Neovim's functionality, and provide a sense of where you are headed as you continue through your journey to learn Neovim.

Finally, take a moment to learn about navigating Neovim's help pages, which can be invaluable when you need to look something up quickly.

Learn to Navigate

Whether you intend to use Neovim primarily as a text editor or a development environment, some of the most common operations involve navigating inside and between buffers. So, with the fundamentals under your belt, the next step is to learn your way around the editor itself.

Next, get familiar with marks, what they are, the different types of marks, and how to use them. Learning to use marks effectively and integrating them into your workflow can take time, so take these step by step.

After you have a basic understanding of marks, take a look at Neovim's jump list and change list, which Neovim automatically maintains to make it easy to return to the locations you recently visited or edited. Likewise, take a look at Neovim's powerful search functionality that allows you to pinpoint specific parts of your buffer or project that you would like to jump to.

Finally, take a look at Neovim's folds feature, which allow you to hide content that you are not presently working. Fold's can simplify navigation by allowing you to "step over" content, and they can also provide a more "distraction free" editing environment by hiding extraneous content.

Dig Deeper into Editing

Neovim has many powerful, built-in editing features that can greatly enhance your productivity. Start from Neovim's registers, which are similar to the "cut and paste" functionality of conventional editors, but must more flexible and powerful. Get to know the basics of Neovim's spell checking capabilities, as well as how to search and replace text in your buffers and projects.

Finally, take a moment to learn how to record and execute macros, which can greatly improve your editing efficiency by automating repetitive actions.

Configure & Customize

Having learned the basics of working with Neovim, you are now in a great position to start taking steps to customize your Neovim environment to suit your workflow.

At this point it can help to take a moment to determine what you want to achieve with Neovim. Are you looking for a full IDE, or just a simple but featureful text editor? Do you want to maintain a consistent environment across your work and personal computers, or do you prefer to have a highly-customized experience on a single machine? There are many different ways that these questions can be answered, and those answers can help you focus your effort on customizations that align with your goals.

For example, we generally prefer to follow the Unix philosophy - each tool in our arsenal should do one thing and do it well. As such, we leverage Neovim as an excellent text editor, then use other tools to manage files, our git repositories, etc. We generally limit our plugins to only those that truly provide unique functionality that we can't achieve with stock Neovim or with our own personal plugins or user-commands.

Regardless of your philosophy, we highly recommend foregoing Neovim's legacy Vimscript support, and using Neovim's newer Lua configuration format. Next, while it is fairly simple to create a blank init.lua file to start configuring from scratch, there are a variety of starter configurations such as [[kickstart.nvim], that can provide you with a basic configuration that you can then edit as you identify tweaks and adjustments that you would like to make.

This is a great time to familiarize yourself with custom keymaps, creating and executing user-commands, as well as Neovim's powerful auto-commands.

That's enough preparation, let's get started!