技巧86-统计当前模式的匹配个数
- 方法1:
/DLOG
:%s///gn
- 方法2
- 其中%表示只在当前文件查找
- 模式域留空的目的是让:vimgrep使用当前查找的模式。
/DLOG
:vimgrep //g %
- 方法3:
:cnext
:cprev
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
/DLOG
:%s///gn
/DLOG
:vimgrep //g %
:cnext
:cprev