affordableCebu
Classified Ads
Tips & Guides
Login
Register
Search
Ask Question
Post a Free Ad
Home
»
Questions
»
Computers
[
Ask a new question
]
Remove lines efficiently in Vim
Remove lines efficiently in Vim
How can you remove given lines efficiently in Vim?
Asked by:
Guest
| Views: 206
Total answers/comments:
2
Comments display order:
By default
New comments first
Old comments first
Guest
[
Entry
]
"To remove all lines that match div
:g/div/d
To remove all lines that don't match div
:g!/div/d"
Guest
[
Entry
]
":V/div/d
In case of larger files, it might be faster to:
:%!grep div"