Neovim 101 — Mouse and Menu

Using the mouse and custom menu with Neovim for faster navigation.

alpha2phi
6 min readMar 1, 2023
Mouse and Menu

One key driver using Neovim is having a mouseless development environment to reduce the context switches and RSI (repetitive strain injury). However, using a mouse could be convenient at times.

In this article, let’s explore how we can use the mouse together with customized menus.

This article is part of the Neovim 101 series.

The Neovim configuration files are available in this repository.

Getting Started

One of the key drivers for using Neovim is the mouseless development experience.

However, Neovim does support using the mouse (:h mouse-overview). We will explore how to use this feature to have a better user experience with Neovim.

Mouse Support

Options

We enable mouse support using the mouse (:h mouse) option.

For example, we use the following command to enable the mouse in Normal mode and Visual mode.

:set mouse=nv

Mouse support can be enabled for different modes:

  • n — Normal mode
  • v — Visual mode

--

--

alpha2phi

Software engineer, Data Science and ML practitioner.