[英]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.