nvim-bullseye is a Lua Neovim plugin that provides convenient keybindings for editing and pasting text in Neovim. It allows you to perform actions such as editing in insert or append mode and pasting from the default register before or after the current word.
Note
This is a new project. New features or changes to current functionality are likely (keeping disruptive changes like changes to existing function names to a minimum). Suggestions for how to improve the plugin and pull requests are welcome.
Follow your plugin manager's instructions for installing lua plugins from GitHub.
init.lua:
-- packer
use { "jt-ziolo/nvim-bullseye" }
-- lazy.nvim
{ "jt-ziolo/nvim-bullseye" },
Keybinds should target the following functions:
Function | Valid Mode(s) |
---|---|
.startAppendAfterWord() | n |
.startInsertBeforeWord() | n |
.pasteBeforeN() | n |
.pasteAfterN() | n |
Example:
vim.keymap.set({"n"}, "<leader>a", "<cmd>lua require('nvim-bullseye').startAppendAfterWord()<CR>", { desc = "BullseyeStartAppendAfterWord" })
vim.keymap.set({"n"}, "<leader>i", "<cmd>lua require('nvim-bullseye').startInsertBeforeWord()<CR>", { desc = "BullseyeStartInsertBeforeWord" })
vim.keymap.set({"n"}, "<leader>P", "<cmd>lua require('nvim-bullseye').pasteBeforeN()<CR>", { desc = "BullseyePasteBeforeN" })
vim.keymap.set({"n"}, "<leader>p", "<cmd>lua require('nvim-bullseye').pasteAfterN()<CR>", { desc = "BullseyePasteAfterN" })
The plugin provides the following functionality:
-
Begin editing in insert mode before the current word: This action allows you to start editing in insert mode before the word that your cursor is currently over. A space is automatically added between the word you started on and where you begin editing from.
-
Begin editing in append mode after the current word: This action lets you start editing in append mode after the word that your cursor is currently over. A space is automatically added between the word you started on and where you being editing from.
-
Paste from the default register before the current word: This action allows you to paste the contents of the default register (usually the most recent yank or delete) before the current word. A space is automatically added after the pasted text. Additionally, you can specify the number of times to paste the register contents by providing a count before the command (#).
-
Paste from the default register after the current word: This action enables you to paste the contents of the default register after the current word. A space is automatically added before the pasted text. You can also specify the number of times to paste the register contents.
Please see the CONTRIBUTING.md file for information on how to contribute to this project.
This project is licensed under the Apache License. See the LICENSE file for more information.