顯示一個 #define
:dsearch
範例
一般模式 0 / 2命令列模式 1 / 2一般模式 2 / 2顯示一個 #define。
視窗
- main.c 使用中
#include "defs.h" int result = LIMIT;
指令已輸入。按 Enter 執行。
視窗
- main.c 使用中
#include "defs.h" int result = LIMIT;
命令列
- 輸入的文字
:dsearch LIMIT- 插入偏移量
14
顯示 defs.h 中的巨集定義。
包含搜尋結果
- defs.h:1
#define LIMIT 3
操作前後
操作前
視窗
- main.c 使用中
#include "defs.h" int result = LIMIT;
操作後
包含搜尋結果
- defs.h:1
#define LIMIT 3
依 Vim 文件示範。+find_in_path。main.c 包含所示的 defs.h,path=. 可找到該檔案,define 比對 #define,include 比對 #include。目前緩衝區名稱為 main.c,且 defs.h 為其旁可讀取的磁碟檔案。cmdheight=4,無待處理訊息,且至少 80 欄寬,使短輸出保持未換行並避免 hit-enter。輸出面板為帶標籤的摘要。顯示 defs.h 中的巨集定義。主要說明::dsearch。
#include "defs.h"
int result = LIMIT;游標位於第 1 行,第 1 欄