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 ...
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, privacy policy and cookie policy

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