Vim删除开头和结尾匹配的行

(1)删除匹配“每行以pattern开头”的行

:g/^pattern/d

 (2)删除匹配“每行以pattern结尾”的行

:g/pattern$/d

原文地址:https://www.cnblogs.com/Robotke1/p/3053623.html