Split window and jump to definition under the cursor
Ctrl-w d
Example
Normal 0 / 1Normal 1 / 1#define LIMIT 10
int target;
use LIMIT target;
#include "later.h"Cursor on line 3, column 5#define LIMIT 10
int target;
use LIMIT target;
#include "later.h"Cursor on line 1, column 9Split window and jump to definition under the cursor.
Prepared source workspace
#define LIMIT 20 int target_later; int target;
- Current
example.c- Include
later.h- Keyword
LIMIT
Illustrated windows
- example.c Active
Active source
Open a split and jump to the prepared first match.
Prepared source workspace
#define LIMIT 20 int target_later; int target;
- Current
example.c- Include
later.h- Keyword
LIMIT
Illustrated windows
- example.c Active
Definition/declaration found
- example.c
Original window retained
Before & after
#define LIMIT 10
int target;
use LIMIT target;
#include "later.h"Cursor on line 3, column 5Prepared source workspace
#define LIMIT 20 int target_later; int target;
- Current
example.c- Include
later.h- Keyword
LIMIT
Illustrated windows
- example.c Active
Active source
#define LIMIT 10
int target;
use LIMIT target;
#include "later.h"Cursor on line 1, column 9Prepared source workspace
#define LIMIT 20 int target_later; int target;
- Current
example.c- Include
later.h- Keyword
LIMIT
Illustrated windows
- example.c Active
Definition/declaration found
- example.c
Original window retained
ILLUSTRATION. Prepared example.c includes later.h below the cursor. Use C-style include/define patterns, path=., iskeyword includes underscore, and no comment matches. All sources are illustrated data; no file is opened. Search begins at file start.
Details & Vim help
Split window and jump to definition under the cursor. Use in Normal mode. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.