-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vim: Add support for ap
and ip
paragraph text objects
#7687
vim: Add support for ap
and ip
paragraph text objects
#7687
Conversation
@noritada thank you for taking a pass at this! I have a number of suggestions for improvement. If you'd like to work together on getting this over the line, feel free to book time here: https://calendly.com/conradirwin/pairing; otherwise I'll upload comments to Github and we can try to do this async. |
Thank you very much! I've booked at Calendly. |
@ConradIrwin I have updated the main part. Could you review it? "Paragraphs" in vim include not only non-blank paragraphs but also "blank paragraphs," which is a little different from what most people think of as paragraphs. I felt that it would be difficult to understand the code without shared recognition of this specification, so I have documented the specification in the doc comment. Since changes for normal/delete.rs is just for edge cases, I think I should confirm the main part first. |
ad5ef6c
to
f0756a9
Compare
@noritada Thanks for this, I like the new approach! A few notes:
|
…tion of a paragraph object
@noritada Please let me know if you're still planning to work on this. |
@ConradIrwin However, after investigating the issue of not being able to properly test Could you please take a look at this PR to see why tests for the visual line mode is not passing? |
@noritada I think even with the fixes to the tests, there are still bugs to be addressed here:
In this case the zed line-mode selection does not extend to the last line of the paragraph. It is probably easier to create test-cases manually instead of using
Happy to work together on this if you want help getting it over the line: https://calendly.com/conradirwin/pairing. |
Thank you very much! I understand the policy. By building and using the app, I have understood the problem and have fixed the end position of the selection. |
a7367e7
to
ebb97f8
Compare
@noritada One comment for you, but this seems to work well for me manually. Is there anything else you want to do before I merge? |
@ConradIrwin Sorry for my absence for a few days. There was an issue with |
Thanks for this @noritada! |
This PR adds support for
ap
/ip
text objects in Vim mode and allows users to perform paragraph-based operations.Cases where compatibility with Neovim's behavior is checked, cases where there are known differences in behavior with Neovim (cases where the landing position is other than the beginning of the line), and cases where the Neovim behavior in the test suite seems strange are separated in the test code so that they can be identified.
Release Notes:
ap
andip
paragraph text objects in Vim mode (#7359).