vpatternd

例:

> cat example.txt
  TODO: complete this
  NOT this
  NOT that
  TODO: Complete that

使用 vim 開啟 example.txt 並在 Ex 模式下鍵入:v/TODO/d。這將刪除所有不包含 TODO 模式的行。

StackOverflow 文件 StackOverflow 文件