【发布时间】:2019-03-25 01:34:34
【问题描述】:
从文档中,:global 命令的语法是:
:[range]g[lobal]/{pattern}/[cmd]
Execute the Ex command [cmd] (default ":p") on the
lines within [range] where {pattern} matches.
我也遇到过:g这样的用法:
:g/apples/+1,/peaches/ s/^/# /g
:g/start/+1,$ sort n
这里的/apples/+1,/peaches/ 属于{pattern} 吗?此语法记录在哪里?
【问题讨论】:
-
请问您在哪里看到的这些用法?
-
哦,谢谢!我知道了。很高兴你找到答案。无论如何,为什么我不能标记你的名字?
-
@seuling:在 Meta 上查看 answer。