Skip to content

Conversation

@Strike-F8
Copy link

@Strike-F8 Strike-F8 commented Oct 22, 2025

Adding these two entries to forward_to_next_list should cause forward motion to additionally stop at punctuation just like vim default behavior. This prevents the occasional undesired behavior of consuming punctuation when using dw or cw.

Tested using Neovim v0.11.4.

I am not good with regex so I asked ChatGPT to create these two lines for me. It seems to be working but I'm sure there are cases I haven't tested.

Strike-F8 and others added 2 commits October 22, 2025 10:50
Adding these two entries to forward_to_next_list should cause forward motion to additionally stop at punctuation.
This prevents the occasional undesired behavior of consuming punctuation when using dw or cw.

Tested using Neovim v0.11.4
Ensure that dw deletes the last character of the last word of the line
without touching the next line.
CamelCaseMotion was inconsistently grabbing the next line when deleting
the last word of the line but this should prevent that from happening.
@Strike-F8
Copy link
Author

Added another commit that improves handling of the last word of a line.
This should ensure the last character of the last word of the line is deleted without touching the following line.
Before, if the next line was empty, it would work properly, but if there was another word to jump to, it would eat the new line.

This still doesn't fix deleting the very last word of the file but that's a rare case.

@Strike-F8
Copy link
Author

It turns out that it still crosses over to the next line if there is whitespace at the beginning of the line. I haven't figured out how to prevent this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant