# `vim::text_object` Notes
`vim::text_object` resolves Vim text objects into validated operator targets.
It is pure editor semantics. It has no access to Bevy, ECS messages, buffers,
registers, status rendering, or filesystem state.
## Public Shape
- `TextObject`: parsed object extent and family.
- `TextObjectScope`: `Inner` for `i`, `Around` for `a`.
- `TextObjectKind`: `Word` for `w`, `Paragraph` for `p`.
- `resolve_text_object_range`: resolves an object against a text snapshot,
cursor byte index, and count.
The intended flow is:
```text
NormalGrammar -> NormalOperatorTarget::TextObject -> OperatorTargetSource::TextObject -> OperatorTarget
```
## Invariants
- Text objects are target producers, not mutations.
- Returned ranges are half-open byte ranges over the supplied text snapshot.
- Callers still validate the returned range through `OperatorTarget`.
- Word objects use Vim lowercase word classes: keyword runs and punctuation
runs are distinct, whitespace is a separator.
- Paragraph objects are nonblank line runs separated by blank lines.
- `Around` word objects prefer trailing whitespace, then preceding whitespace.
- `Around` paragraph objects prefer following blank separator lines, then
preceding blank separator lines.
- Missing objects fail as `TargetResolutionError::NoTextObject`.
## Current Gaps
- Sentence, quote, bracket, tag, and block objects are not implemented.
- `WORD` objects are not implemented.
- Visual-mode text-object selection is characterwise for the current slice.
Blockwise and linewise-specific refinements remain future work.