I have this file

name ...

name ...
line 2

name ...
line 3


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

The result will be

name ...

name ...

name ...

1 Answer 1


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 you have read our privacy policy.

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