Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/notomo/reacher.nvim
Displayed range search buffer
https://github.com/notomo/reacher.nvim
neovim neovim-plugin
Last synced: 1 day ago
JSON representation
Displayed range search buffer
- Host: GitHub
- URL: https://github.com/notomo/reacher.nvim
- Owner: notomo
- License: mit
- Created: 2020-11-03T12:36:06.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-15T23:55:44.000Z (2 days ago)
- Last Synced: 2024-11-16T00:25:27.954Z (2 days ago)
- Topics: neovim, neovim-plugin
- Language: Lua
- Homepage:
- Size: 286 KB
- Stars: 25
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# reacher.nvim
This plugin introduces displayed range search buffer.
(Required neovim nightly)## Example
```lua
-- search in the current window
vim.keymap.set({ "n", "x" }, "gs", [[lua require("reacher").start()]])-- search in the all windows in the current tab
vim.keymap.set({ "n", "x" }, "gS", [[lua require("reacher").start_multiple()]])-- search in the current line
vim.keymap.set({ "n", "x" }, "gl", function()
require("reacher").start({
first_row = vim.fn.line("."),
last_row = vim.fn.line("."),
})
end)local group = "reacher_setting"
vim.api.nvim_create_augroup(group, {})
vim.api.nvim_create_autocmd({ "FileType" }, {
group = group,
pattern = { "reacher" },
callback = function()
vim.keymap.set({ "n", "i" }, "", [[lua require("reacher").finish()]], { buffer = true })
vim.keymap.set({ "n", "i" }, "", [[lua require("reacher").cancel()]], { buffer = true })vim.keymap.set("n", "gg", [[lua require("reacher").first()]], { buffer = true })
vim.keymap.set("n", "G", [[lua require("reacher").last()]], { buffer = true })
vim.keymap.set("n", "j", [[lua require("reacher").next()]], { buffer = true })
vim.keymap.set("n", "k", [[lua require("reacher").previous()]], { buffer = true })vim.keymap.set("i", "", [[lua require("reacher").next()]], { buffer = true })
vim.keymap.set("i", "", [[lua require("reacher").previous()]], { buffer = true })
vim.keymap.set("i", "", [[lua require("reacher").forward_history()]], { buffer = true })
vim.keymap.set("i", "", [[lua require("reacher").backward_history()]], { buffer = true })
end,
})
```