With this plugin, when you select text in visual mode, all instances of that text will be highlighted in all visible windows. This makes it simple and convenient to spot any duplicated text.
match-visual.mp4
use 'aaron-p1/match-visual.nvim'
require('match-visual').setup({
-- minimum length of text to match
min_length = 1,
-- Visual group to use for highlighting
-- You could also override the "VisualMatch" hl group to change the highlights.
hl_group = "Visual"
-- id to use in matchadd(). Only needs to be set if you already use this id
match_id = 118,
})
If you're interested in contributing to this plugin, it's important to note that it's written in
fennel. The lua code is generated using the fennel transpiler, so all
contributions must also be written in fennel. You can use the command $ make
to transpile the
code, and before committing any changes, it's mandatory that you use the
fnlfmt tool by running $ make format
or using the
null-ls neovim plugin to format the code.
If you're using nix, a package manager for Linux and other Unix
systems, you can easily install the necessary programs for development by running
$ nix develop
, or by using direnv with
nix-direnv.