显示第 n 次出现的搜索文本
Show the nth occurrence of searched text
当您在文件 (using '/')
中进行搜索时,我正试图找到一些可以计算响应数量的东西,这样您就知道您正在查看 3/10
个结果。
外面有这样的东西吗?也许与航空公司整合?
试试这个插件https://github.com/henrik/vim-indexed-search
它在 Vim 次搜索中显示 "Match 123 of 456 /search term/"
:vim foo %
就是这样做的:
(1 of 32): <the line containing the first match>
您还可以这样做:
:%s/foo//n
这将输出如下内容:
32 matches on 32 lines
请注意,第一个只能在保存的缓冲区上可靠地工作。
当您在文件 (using '/')
中进行搜索时,我正试图找到一些可以计算响应数量的东西,这样您就知道您正在查看 3/10
个结果。
外面有这样的东西吗?也许与航空公司整合?
试试这个插件https://github.com/henrik/vim-indexed-search
它在 Vim 次搜索中显示 "Match 123 of 456 /search term/"
:vim foo %
就是这样做的:
(1 of 32): <the line containing the first match>
您还可以这样做:
:%s/foo//n
这将输出如下内容:
32 matches on 32 lines
请注意,第一个只能在保存的缓冲区上可靠地工作。