Repository navigation
feat(vim): add paragraph and sentence motions - #303
Merged
Merged
Conversation
fcoury
force-pushed
the
fcoury/vim-paragraph-sentence-motions
branch
from
August 21, 2026 22:06
e734377 to
ed6e416
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Red's Vim mode supports word motions and paragraph text objects, but it lacks Neovim's paragraph and sentence navigation and sentence text objects. That makes everyday prose and code navigation inconsistent between the file editor and embedded modal textareas.
What changed
{/}paragraph motions and(/)sentence motions to the file editor and embedded textareas, including counts, Visual selections, operator-pending forms, jumplist integration, and Unicode-safe cursor positioning.is/assentence text objects with Neovim-compatible sentence whitespace, punctuation and closing-delimiter handling, paragraph boundaries, linewise registers, undo, and dot-repeat.docs/VIM_COMPATIBILITY.md, and add focused motion, editing, register, Unicode, and embedded-textarea regressions.How to Test
{,}, and2}; verify that only genuinely empty lines are paragraph boundaries. Exercised},y}p, andv}xand confirm their deletion, paste, register, and blank-line selection behavior matches Neovim.One. Two! Three? End, then exercise(,),2),dis,das,d3is,v2is, dot-repeat, and undo. Verify sentence punctuation and surrounding whitespace are preserved or consumed according to the selected motion/object.cargo test -p red --test movement --test editing --test modal_textareaand verify all editor, sentence/paragraph, register-shape, Unicode, and embedded-textarea parity regressions pass.