DEV Community

Paul
Paul

Posted on

Making your Vim easier to follow 👀

By default Vim is hard to follow for people other than the person driving. When pair programming or doing code review, the ability to follow along with the person editing is obviously super important. My coworkers get visibly exhausted when we view code on my machine. As much as I'd like to think it's because I'm incredibly fast with Vim (I am pretty fast 🔥), it's more likely due to the fact that terminal Vim is just a little hard to keep up with for a few reasons.

  1. Scrolling happens instantly, there is no smooth animation.
  2. The cursor tends to jump around wildly if you're watching a seasoned Vim user.
  3. Jumps between splits, buffers, tabs, etc. are hard to follow

A minimalistic GUI: Neovide

Neovide is a very simplistic Gui around Neovim (the Vim fork with among many improvements, an emphasis on being embeddable). It adds a few nice features, but the killer one for me is the animated cursor:

Neovide demo

This solves so many pain points when anyone is watching a Vim user. It animates your cursor between every motion. Navigating between splits, buffers, the quickfix window, etc.

And for bonus fun you can add particle effects.

May hamper some of your usual workflows:

📓 By default <CR> V is not bound to paste to paste in Neovide. Instead, you can paste from the + (clipboard) register: ["+]p, or in insert mode: [<cr>r]+.

Smooth scrolling

Smooth scrolling

Smooth scrolling is a lot easier on the eyes and makes it a lot less disorienting for your viewers when you're navigating a large file. Smooth scrolling has been discussed in the Neovide issues , but isn't added yet. Instead, it is possible to get a nice smooth scrolling experience via a Vim plugin. This works in terminal Vim too: Vim Smoothie.

These small changes can really improve the editing experience for yourself and for those following along. Happy Vimming!

Top comments (0)