Linewise text objects select one or more complete lines and integrate with Vim’s linewise visual mode (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.
V). This means operators like d, y, >, and = act on whole lines rather than character spans — ideal for bulk edits, restructuring, or selecting logical sections of a file.
entireBuffer
Function: entireBuffer()Default keymap:
gG
Selects every line in the current buffer as a single linewise text object. Temporarily disables folding during selection so that folded regions are not accidentally omitted from the top or bottom of the buffer.
restOfParagraph
Function: restOfParagraph()Default keymap:
r
Selects from the cursor line to the end of the current paragraph, linewise. Behaves like Vim’s } motion but produces a linewise selection rather than moving the cursor, and does not include the trailing blank line that } lands on. On the last line of the buffer the selection extends to that line without going out of bounds.
visibleInWindow
Function: visibleInWindow()Default keymap:
gw
Selects all lines currently visible in the active window — from the topmost rendered line (w0) to the bottommost rendered line (w$). Useful for operating on exactly what you can see, regardless of the total buffer size.
restOfWindow
Function: restOfWindow()Default keymap:
gW
Selects from the cursor line down to the last visible line in the window. A complement to visibleInWindow when you only want the lower portion of the visible area.
closedFold
Function: closedFold(scope)Default keymaps:
iz (inner), az (outer)Forward-seeking: big (15 lines) Selects a closed fold as a linewise text object. If the cursor is already on a closed fold that fold is selected immediately; otherwise the plugin seeks forward up to
forwardLooking.big lines for the next closed fold.
- Inner — only the lines that belong to the fold itself
- Outer — includes the line immediately after the fold
y (yank) the fold is automatically re-closed afterward; for other operators such as d or gu the fold is left open.
notebookCell
Function: notebookCell(scope)Default keymaps:
iN (inner), aN (outer)
Selects a notebook cell delimited by double-percent cell markers in the Jupytext percent format, such as # %% in Python or // %% in JavaScript. The exact marker depends on the buffer’s commentstring.
- Inner — lines of the cell body only, cell border line excluded
- Outer — includes the cell’s top border line (
# %%)
The buffer must have a
commentstring set (:set commentstring?). Buffers without one — such as plain text files — will produce a warning and abort the operation.