Improve compatibility of vim example#89
Open
mcclure wants to merge 12 commits into
Open
Conversation
Laugh if you want, but I'm literally making this commit on an Android tablet and the OS swallows ESC inputs!
Owner
|
Could you rebase this branch onto the latest |
Author
|
Sure. Do you have a preference between leaving the features in separate commits vs doing a squash commit? |
43861bf to
1a5e38b
Compare
Author
|
I left the commits separate, does that fix it? |
Owner
|
Yes, leaving the commits separate is fine. I think you forgot to apply rustfmt. |
Author
|
Sorry about that, formatted now. Does that cover everything? |
Owner
|
Could you run |
Author
|
Again apologies, I should have read Contributing.md more carefully. |
pm100
added a commit
to pm100/ratatui-textarea
that referenced
this pull request
Mar 24, 2026
…trl+[ Port improvements from rhysd/tui-textarea#89: - Add Replace mode (r for replace-once, R for overtype) - Add arrow key support alongside hjkl in normal mode - Add J (join lines) with visual mode support - Add S (substitute lines) with visual mode support - Add Ctrl+[ as Escape alias in normal, insert, and replace modes - Fix x to not delete at end of line - Fix a to not advance past end of line Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pm100
added a commit
to pm100/ratatui-textarea
that referenced
this pull request
Mar 25, 2026
…trl+[ Port improvements from rhysd/tui-textarea#89: - Add Replace mode (r for replace-once, R for overtype) - Add arrow key support alongside hjkl in normal mode - Add J (join lines) with visual mode support - Add S (substitute lines) with visual mode support - Add Ctrl+[ as Escape alias in normal, insert, and replace modes - Fix x to not delete at end of line - Fix a to not advance past end of line Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pm100
added a commit
to ratatui/ratatui-textarea
that referenced
this pull request
Mar 27, 2026
…trl+[ (#22) Port improvements from rhysd/tui-textarea#89: - Add Replace mode (r for replace-once, R for overtype) - Add arrow key support alongside hjkl in normal mode - Add J (join lines) with visual mode support - Add S (substitute lines) with visual mode support - Add Ctrl+[ as Escape alias in normal, insert, and replace modes - Fix x to not delete at end of line - Fix a to not advance past end of line Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
The vim example is actually pretty good, and I am using it as the basis of an application. It does have some slight behavior divergences from normal vim, some of which require minimal code to fix.
I have made some changes to make it more vim-like:
aandxwhen issued on the final character of a lineJin normal and visual modeSin normal and visual moder/Rin normal (add a replace mode)[as shortcut for ESC (some machines, like my Android tablet, cannot easily type an ESC)Some notes about these changes:
aandxand make some of the other code simpler.:command line mode in a separate branch, but it is very complicated (and my current version uses a parser library), so I am not going to PR this unless you request it.Thanks!