Vim Recall繁體中文

Lookup Keyword under the cursor with 'keywordprg'

K

Example

Normal 0 / 1
help
Cursor on line 1, column 1

Lookup Keyword under the cursor with 'keywordprg'.

Prepared keyword lookup

keywordprg
:help
Keyword
help
Before & after
Before
help
Cursor on line 1, column 1

Prepared keyword lookup

keywordprg
:help
Keyword
help
After
			*help* *<Help>* *:h* *:help* *<F1>* *i_<F1>* *i_<Help>*
<Help>		or
:h[elp]			Open a window and display the help file in read-only
			mode.
Cursor on line 1, column 25

Prepared keyword lookup

keywordprg
:help
Keyword
help

Read-only help EXCERPT

			*help* *<Help>* *:h* *:help* *<F1>* *i_<F1>* *i_<Help>*
<Help>		or
:h[elp]			Open a window and display the help file in read-only
			mode.
Topic
help
Cursor
Offset 3, on *help*, relative to this excerpt

Illustrated windows

helphelp.txt Active
Read-only help topic excerpt
example.txt
Original text

ILLUSTRATION. keywordprg=:help, helplang=en and nosplitbelow are prepared; no help window is already open and the current window has room for a help split. Place the cursor on help. The leading colon routes lookup to Vim help, without launching an external program. The result shows a HELP EXCERPT beginning at the help tag, not the full help buffer; its cursor offset is relative to that excerpt.

Details & Vim help

Lookup Keyword under the cursor with 'keywordprg'. Use in Normal mode. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.