gVim 中是否有功能、插件或方法来显示匹配搜索词的标记,指出它们在缓冲区中的大致位置?例如,当在缓冲区中搜索“foo”时,该功能会将标记与垂直滚动条一起放置。每个标记都指示一个匹配的“foo”。当您滚动到该位置时,您会在缓冲区中看到一个“foo”。通过此功能,我可以轻松地直观地了解术语的分布模式,当前术语在文档中的相对位置以及大约出现的次数。
如果没有这样的功能,有没有办法在插件中操作 gVim 的滚动条和其他 GUI 组件?
在 Firefox 中,类似的功能是通过 搜索标记(已过时),XUL/Migemo(已过时)或 FindBar Tweak(最新)扩展。
更新:

(来源:mozilla.net)

(来源:mozilla.net)
Is there functionality, plugin or ways in gVim to show markers of matched search terms, which point out their rough positions in the buffer? For example, when search "foo" in the buffer, the feature put markers along with the vertical scrollbar. Each marker indicates an matched "foo". When you scroll to that position, you see a "foo" in the buffer. With this feature I can easily tell the distribution pattern of the term visually, where the current term is relatively in the document and approximately how many occurrences.
If no such feature, is there way to manipulate scrollbar and other GUI components of gVim in plugin?
In Firefox the similar feature is done by Search Marker (outdated), XUL/Migemo (outdated) or FindBar Tweak (up-to-date) extensions.
UPDATE:

(source: mozilla.net)

(source: mozilla.net)
发布评论
评论(2)
如果您想查看分布,您可以尝试:
这将显示找到搜索模式的行。
If you want to see the distribution, you could try:
this will show the lines where the search pattern is found.
尝试
:set hlsearch
获取突出显示的搜索词。还可以尝试按
^G
查看光标所在的行和列。Try
:set hlsearch
to get highlighted search terms.Also try pressing
^G
to see the line and column of the cursor.