zed icon indicating copy to clipboard operation
zed copied to clipboard

Vim mode: support paragraph operation using ap/ip

Open noritada opened this issue 1 year ago • 1 comments

Check for existing issues

  • [X] Completed

Describe the feature

In Vim mode, although users can use daw (delete a word), diw (delete inner word), das (delete a sentence) and dis (delete inner sentence), dap (delete a paragraph) and dip (delete inner paragraph) cannot be used. It would be nice if it is implemented.

See :help ap in Vim:

ap			"a paragraph", select [count] paragraphs (see
			paragraph).
			Exception: a blank line (only containing white space)
			is also a paragraph boundary.
			When used in Visual mode it is made linewise.

							v_ip ip
ip			"inner paragraph", select [count] paragraphs (see
			paragraph).
			Exception: a blank line (only containing white space)
			is also a paragraph boundary.
			When used in Visual mode it is made linewise.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

noritada avatar Feb 04 '24 16:02 noritada

I read the source code, found the problem area and have started implementation, hoping to be able to submit a PR.

noritada avatar Feb 04 '24 16:02 noritada

@noritada thank you! If you'd like to pair with me to help get it over the line, feel free to book time: https://calendly.com/conradirwin/pairing

ConradIrwin avatar Feb 06 '24 01:02 ConradIrwin

@ConradIrwin I have submitted a PR #7687. I hope you will take a look at it when you have time.

noritada avatar Feb 12 '24 11:02 noritada

This is available in Zed v0.126.0-pre.

JosephTLyons avatar Mar 06 '24 22:03 JosephTLyons