Castabout is an example Neovim plugin to search through a buffer. You should probably use Telescope instead. Castabout is a simple demonstratation of a basic Neovim plugin in Lua.
Castabout optionally depends on dressing.nvim for fancy UI.
Install the plugin using your favorite package manager. For example, with Packer:
return require('packer').startup(function(use)
use({
'https://github.com/nat-418/castabout.nvim',
requires = 'https://github.com/stevearc/dressing.nvim'
})
end)
There is no configuration. Just use :Castabout forwards
or :Castabout backwards
to search like /
or ?
.
You could override default keymaps like this, but probably should not:
-- Use Castabout in normal and visual modes using / and ? keys
vim.keymap.set({'n', 'v'}, '/', '<Cmd>Castabout forwards<CR>')
vim.keymap.set({'n', 'v'}, '?', '<Cmd>Castabout backwards<CR>')