類似 :grep,但搜尋說明檔案
:helpgrep
範例
一般模式 0 / 2命令列模式 1 / 2一般模式 2 / 2alpha
beta
gamma游標位於第 1 行,第 1 欄alpha
beta
gamma游標位於第 1 行,第 1 欄*demo-topic*
DemoNeedle: a tiny example help topic.游標位於第 2 行,第 1 欄類似 :grep,但搜尋說明檔案。
指令已輸入。按 Enter 執行。
命令列
- 輸入的文字
:helpgrep DemoNeedle- 插入偏移量
20
:helpgrep 找到唯一匹配的說明行並跳轉至該行。結果儲存於全域 quickfix 清單中。
視窗
- 說明:demo.txt 使用中
*demo-topic* DemoNeedle: a tiny example help topic.
- 原本的緩衝區
alpha beta gamma
Quickfix 清單
- 1
demo.txt:2: DemoNeedle: a tiny example help topic.
操作前後
alpha
beta
gamma游標位於第 1 行,第 1 欄*demo-topic*
DemoNeedle: a tiny example help topic.游標位於第 2 行,第 1 欄視窗
- 說明:demo.txt 使用中
*demo-topic* DemoNeedle: a tiny example help topic.
- 原本的緩衝區
alpha beta gamma
Quickfix 清單
- 1
demo.txt:2: DemoNeedle: a tiny example help topic.
依 Vim 文件示範。+quickfix 且未壓縮的說明。runtimepath 僅包含此小型說明執行階段,無其他 DemoNeedle 匹配。無現有的說明視窗,分割空間足夠且 nosplitbelow。:helpgrep 找到唯一匹配的說明行並跳轉至該行。結果儲存於全域 quickfix 清單中。主要說明::helpgrep。