nvim-various-textobjs extends Neovim with a curated collection of more than 30 new text objects that cover the patterns you encounter every day: indentation blocks, camelCase/snake_case subwords, any bracket or quote pair, URLs, LSP diagnostics, color values, file paths, and more. Each object integrates naturally with Neovim’s operator-pending and visual modes, and most support bothDocumentation 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.
inner and outer variants.
Installation
Add the plugin with lazy.nvim or packer and get running in seconds.
Configuration
Enable default keymaps or wire up your own bindings from scratch.
Text Object Reference
Full table of every text object, its default keymap, and inner/outer behavior.
Advanced API
Use text objects as a Lua API to build custom motions and editor commands.
Why nvim-various-textobjs?
Most text objects in stock Neovim and in Treesitter-based plugins require the cursor to be sitting directly on the object. nvim-various-textobjs adds forward-seeking behavior: many objects will scan ahead up to a configurable number of lines and select the next match automatically — socL changes the next URL without navigating to it first.
Forward-seeking
Most objects search ahead up to
small (5) or big (15) lines, configurable per-setup.Inner / Outer
Almost every object ships with
inner (content only) and outer (includes delimiters) variants.Composable API
Call any text object from Lua to build custom mappings like
dsi (delete surrounding indentation).Quick Start
Start using text objects
The default keymaps are immediately active. Try
viS to select an inner subword, vaS for the outer one, or cL to change the next URL in the buffer.Customize (optional)
Tweak forward-looking distances, disable individual default keymaps, or add your own bindings. See Configuration for all options.
Browse by Category
Indentation Objects
ii, ai, aI, ig/ag, R — work with indented blocks and greedy outer indentation.Charwise Objects
Subword, bracket, quote, value, key, number, URL, filepath, chain member, argument, color, and more.
Linewise Objects
Entire buffer, rest of paragraph, visible window, rest of window, closed folds, notebook cells.
Special Objects
Diagnostic, emoji, column (blockwise), and
nearEoL / lineCharacterwise.