Run 'keywordprg' on the selection
K
Example
Visual 0 / 1Normal 1 / 1helpCursor on line 1, column 4 · Character selection *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 25Run 'keywordprg' on the selection.
Prepared keyword lookup
- keywordprg
:help- Keyword
help
Look up help using the prepared :help command and show the labeled topic excerpt.
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
Before & after
helpCursor on line 1, column 4 · Character selectionPrepared keyword lookup
- keywordprg
:help- Keyword
help
*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 25Prepared 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. Select the one-line text 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
Run 'keywordprg' on the selection. Use in Visual mode. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.