Documentation Index
Fetch the complete documentation index at: https://mintlify.com/chrisgrieser/nvim-various-textobjs/llms.txt
Use this file to discover all available pages before exploring further.
nvim-various-textobjs has no external dependencies — it requires only Neovim and no additional tools, language servers, or Treesitter parsers. There are two installation variants: Variant 1 lets the plugin register all of its built-in default keymaps for you automatically; Variant 2 gives you full control by letting you wire up only the text objects you want, using the keymap style of your choice.
Variant 1 — Use Default Keymaps
Add the plugin to your plugin manager
Install
nvim-various-textobjs and enable keymaps.useDefaults in the opts (or config) table. This registers all built-in keymaps from the text object reference table automatically on startup.Variant 2 — Define Your Own Keymaps
Add the plugin with a keys table
Use the
keys field in lazy.nvim (or call vim.keymap.set manually in packer/your config) to bind only the text objects you want. Each text object is called as an Ex command for dot-repeat compatibility.lazy.nvim
Add keymaps for every text object you need
Each text object function accepts
"inner" or "outer" as its argument (where applicable). Text objects without an inner/outer distinction are called with no arguments. Bind them in both operator-pending mode (o) and visual mode (x) so they work after operators and inside visual selections.Consult the Configuration page for further options
Even when managing your own keymaps, you can still call
setup() to adjust forward-looking distances, notification behavior, and per-object settings. See the Configuration page for all available options.