Neovim 101 — 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.
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.
We enable mouse support using the
:h mouse) option.
For example, we use the following command to enable the mouse in Normal mode and Visual mode.
Mouse support can be enabled for different modes:
n— Normal mode
v— Visual mode
i— Insert mode
c— Command-line mode
h— all previous modes when editing a help file
a— all previous modes
:h hit-enter) and
:h more-prompt) prompt.
For our configuration, we enable the mouse for all modes.
With the mouse enabled, we can click any tab to switch focus to a different tab.
We can resize splits.