Embracing a Personalized Development Environment with Neovim

While I’ve used Vim motions for quite some time, I have been hesitant to adopt Vim as a full-time IDE. After following a few guides, and coming across TJ DeVries’ explanation of a Personalized Development Environment (PDE), I decided to give Neovim a try as a full-time code editor. Here are some of my learnings and recommendations from attempting to transition to a PDE.

Get a Good Set of Defaults

While this may at first be counterintuitive to the concept of a PDE, having a good default setup significantly reduces the barrier to entry for using Neovim as a full-time editor. The two video guides that I recommend are from ThePrimeagen and TJ DeVries. Start by following one (or a combination of both!) for a simple plug-and-play setup.

For instance, I used TJ’s setup script and then added some of ThePrimeagen’s plugins, such as Harpoon for file navigation. His default keybinds for Harpoon work great since I also use a Dvorak keyboard layout, but Qwerty users may want to change them. Once you have a basic Neovim setup, start using it. Write down frequently used keybinds on a sticky note and when you find yourself needing some new command see if a default already exists. If not, add it and you will be working toward a true PDE in no time!

Don’t use Neovim Alone

Since you will be developing at the command line, it is important to utilize adjacent tools that make working in this environment more productive and enjoyable. For example, while base Vim is very useful, Neovim allows for much greater control and flexibility. Tmux performs a similar role for your terminal. One of the main benefits that tmux offers as a terminal multiplexer is being able to create multiple sessions with multiple windows and panes that persist even after closing your terminal application. This allows you to switch between projects easily and always have your terminal in your desired state.

Additionally, since adopting Neovim and tmux I have become much more comfortable with other terminal-based applications. For example, I have also started using htop which I mainly use as a task manager in my terminal. Learning htop and other Unix tools will make you much more comfortable with the terminal and therefore make you a much more well-rounded and flexible developer.

PDE Struggles

Attempting to transition to a PDE has not been easy. One main struggle I’ve had is debugging in Neovim. For this reason, I have found it much easier to replace my front-end workflow in Visual Studio Code with Neovim, as I only debug with the console and browser tools. However, this is not the case for Rider and my C# backend workflow. The built-in debugger experience that Rider provides is very powerful, and I’ve not yet been able to replicate it with a DAP (Debug Adapter Protocol) in Neovim. In addition to configuring the DAP, it also requires learning additional keybinds that I find trickier to remember, as I’m not using them as frequently as my Vim motion or tmux commands. This is one important aspect of my PDE that I will be looking to improve in the future.

Is it Worth it?

Setting up a PDE is a lot of fun. I’ve always advocated for adopting changes that improve your developer quality of life even if they don’t necessarily lead to massive productivity gains. This is because I have found that adopting developer quality-of-life improvements significantly enhances the productivity and sustainability of my work in the long run by reducing burnout. For this reason alone, it may be worth giving the PDE a shot.

However, if you are happy with your current IDE setup, I have found the majority of quality-of-life improvements can be gained by simply adopting Vim motions in any standard IDE. Therefore, I highly recommend first learning Vim motions and adding a Vim plugin to your current IDE. Once you’ve learned Vim motions, it will be much easier to switch to a Neovim PDE setup if you still find your IDE setup lacking. I hope you enjoy setting up your PDE!

Conversation

Join the conversation

Your email address will not be published. Required fields are marked *