[英]Unable to count the number of matches in Vim
你如何计算Vim中的比赛数量?
例如,对于文本
<?
:%s/<?//ng
请参阅:h count-items
。
:help count-items
在VIM 6.3中,您可以这样做:
:set report=0
:%s/<?/&/g # returns the count without substitution
在VIM 7.2中,您可以这样做:
:%s/<?/&/gn # returns the count without substitution
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.