3

I have this file

name ...
line1

name ...
line 2

name ...
line 3

etc

I want to delete lines after the "..." sequence ,and preserve the others: is possible?

The result will be

name ...


name ...


name ...

1 Answer 1

6

you can do this with :g/regexp/+d

In your case this would (probably) be :g/\.\.\./+d

This (internally) marks all lines matching the regexp and then deletes the next line

Your Answer

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

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