Expand description
Visual selection extraction helpers.
Structsยง
- Bound
- Single position (line, column) inside a buffer.
- Pos
- Normalized, 0-based indexed output of Nvim
getpos(). - RawPos ๐
- Raw
getpos()tuple: (bufnum,lnum,col,off). - Selection
- Owned selection content plus bounds.
- Selection
Bounds - Start / end bounds plus owning buffer id for a Visual selection.
Functionsยง
- bound_
to_ ๐array - get
- Return an owned
Selectionfor the active Visual range. - get_
for_ ex_ range - Extract the persisted Visual selection if it matches the given Ex range; otherwise return the full line range.
- get_
from_ visual_ marks - Return an owned
Selectionfor the persisted Visual marks. - get_
line_ ๐range_ selection - get_
lines - Extract selected text lines from the current
Bufferusing the active Visual range. - get_
marked - Extract the last Visual selection using persisted
'</'>marks. - get_pos ๐
- Calls Nvimโs
getpos()function for the supplied mark identifier and returns a normalizedPos. - get_
selection ๐ - get_
visual_ range_ command_ prefix - Return the command-line range prefix for a persisted Visual selection.
- last_
visual_ ๐mode - selection_
to_ ๐dict - usize_
to_ ๐i64 - visual_
range_ ๐command_ prefix