分割視窗並跳至 #define
:dsplit
範例
一般模式 0 / 2命令列模式 1 / 2一般模式 2 / 2#include "defs.h"
int result = LIMIT;游標位於第 1 行,第 1 欄#include "defs.h"
int result = LIMIT;游標位於第 1 行,第 1 欄#define LIMIT 3
int helper(void);游標位於第 1 行,第 9 欄分割視窗並跳至 #define。
視窗
- main.c 使用中
#include "defs.h" int result = LIMIT;
指令已輸入。按 Enter 執行。
視窗
- main.c 使用中
#include "defs.h" int result = LIMIT;
命令列
- 輸入的文字
:dsplit LIMIT- 插入偏移量
13
跳到 defs.h 中的巨集定義。main.c 仍顯示在另一個分割視窗中。
視窗
- defs.h 使用中
#define LIMIT 3 int helper(void);
- main.c
#include "defs.h" int result = LIMIT;
操作前後
#include "defs.h"
int result = LIMIT;游標位於第 1 行,第 1 欄視窗
- main.c 使用中
#include "defs.h" int result = LIMIT;
#define LIMIT 3
int helper(void);游標位於第 1 行,第 9 欄視窗
- defs.h 使用中
#define LIMIT 3 int helper(void);
- main.c
#include "defs.h" int result = LIMIT;
依 Vim 文件示範。支援 +find_in_path。main.c 引入畫面所示的 defs.h,path=. 可找到此檔,define 與 include 分別比對 #define 和 #include。nosplitbelow 讓新分割出的水平視窗位於來源視窗上方。defs.h 和目前的 main.c 位於同一目錄,且可讀取。跳到 defs.h 中的巨集定義。main.c 仍顯示在另一個分割視窗中。主要說明::dsplit。