4

i use hard wrap (in my vimrc: setl fo+=atw).

I often want to delete from the middle of some row to the end of the paragraph. I do this as follows: d$, j (down one line), 5dd (if there are 5 subsequent lines)

i wonder if there is a more elegant way, or is this how regular vim users would do it? (It's a very minor thing, i'm just curious)

there are some very good resources but they dont seem to answer this Q. Eg: https://stackoverflow.com/questions/22662149/delete-multiple-lines-from-cursor-position-in-vi-editor. People are suggesting dd which deletes the lines without retaining the portion of the first line that i dont want to lose

1

1 Answer 1

5

You can use the } motion, which moves forward a paragraph, together with d, as in d}.

This will delete from the cursor position until the next blank line (not including the blank line itself), which I believe is what you're trying to accomplish.

1
  • 1
    that's excellent, thanks a lot!
    – neverdimed
    May 8, 2022 at 15:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.