A minimal Neovim plugin for floating search & replace with live match tracking, navigation, and quick replacements.
/[current/total])n, N)VimResizedUsing lazy.nvim:
{
"ankushbhagats/match.nvim",
opts = {},
}
Using pckr.nvim:
require("packer").add({
{
"ankushbhagats/match.nvim",
config = function()
require("match").setup()
end,
},
})
| Command | Description |
|---|---|
:Match {text} |
Open Match UI with given search text |
:MatchWord |
Open Match UI using word under cursor |
:MatchLine |
Open Match UI using current line |
| Key | Action |
|---|---|
<Tab> |
Switch between search/replace |
<Esc> / <C-q> |
Close UI |
| Key | Action |
|---|---|
<Up> |
Jump to previous match |
<Down> |
Jump to next match |
<CR> |
Switch to replace window |
| Key | Action |
|---|---|
<CR> |
Replace all matches |
<Up> |
Replace previous match |
<Down> |
Replace next match |
<C-u> |
Undo replacement |
<C-r> |
Redo replacement |
require("match").setup({
prefix = "",
anchor = "NE",
style = "minimal",
border = "rounded",
border_hl = "Function",
})
vim.fn.setreg("/"))vim.fn.searchcount()substitute internallybuf_attach (on_lines)GNU General Public License v3