This topic created in 5242 days ago, the information mentioned may be changed or developed.
对于文件的每一行, 如果可以和指定正则表达式匹配就保留, 否则就删除. 也就是说相当于grep过滤的效果. 在Vim中应该怎么做呢?
2 replies • 1970-01-01 08:00:00 +08:00
 |
|
1
Vim Jan 13, 2012
:v/pattern/d 或者 :g!/pattern/d
|
 |
|
2
mybeky Jan 13, 2012
:v/PATTERN/d
|