質問
知るために、どのように多くの回パターンが存在する現在のバッファーい:
:%s/pattern-here/pattern-here/g
であるということで発生個数のパターンが明らかに面倒なものの効果の設定を変更します。
あまりエレガントにカウント?
解決
他のヒント
:help count-items
VIMでは6.3、こちらかです。
:set report=0
:%s/your_word/&/g # returns the count without substitution
VIMでは7.2、ここだったような思いで
:%s/your_word/&/gn # returns the count, n flag avoids substitution
:!cat %| grep -c "pattern"
このようなvimコマンドがまだ必要なものからvim.
できる地図のコマンドの使用を希望する場合は、事前にします。
のvimscript IndexedSearch はVimコマンドの検索表示"わ#の試合".
カーソルを言葉にしたい回数を記憶させることができます。.
:%s/<c-r><c-w>//gn
見 :h c_ctrl-r_ctrl-w
vimgrepは友達はこちら
vimgrep pattern %
表示:
(1 of 37)
所属していません StackOverflow