From 998d0ffc09d5c7358db62dc88c2e2b87622f60b5 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 23 Jan 2015 20:03:05 -0500 Subject: 'keywordprg': support ex commands - new feature: if the first character of 'keywordprg' is ":", the command is invoked as a Vim ex-command prefixed with [count]. - change default 'keywordprg' to :Man --- runtime/doc/various.txt | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'runtime/doc/various.txt') diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index 6b53b8e24f..3cc0e7c8ab 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -542,7 +542,7 @@ which it was defined is reported. {not available when compiled without the |+eval| feature} *K* -K Run a program to lookup the keyword under the +[count]K Run a program to lookup the keyword under the cursor. The name of the program is given with the 'keywordprg' (kp) option (default is "man"). The keyword is formed of letters, numbers and the @@ -550,19 +550,18 @@ K Run a program to lookup the keyword under the right of the cursor is used. The same can be done with the command > :!{program} {keyword} -< There is an example of a program to use in the tools - directory of Vim. It is called 'ref' and does a - simple spelling check. - Special cases: +< Special cases: + - If 'keywordprg' begins with ":" it is invoked as + a Vim command with [count]. - If 'keywordprg' is empty, the ":help" command is used. It's a good idea to include more characters in 'iskeyword' then, to be able to find more help. - - When 'keywordprg' is equal to "man", a count before - "K" is inserted after the "man" command and before - the keyword. For example, using "2K" while the - cursor is on "mkdir", results in: > + - When 'keywordprg' is equal to "man", a [count] + before "K" is inserted after the "man" command and + before the keyword. For example, using "2K" while + the cursor is on "mkdir", results in: > !man 2 mkdir -< - When 'keywordprg' is equal to "man -s", a count +< - When 'keywordprg' is equal to "man -s", a [count] before "K" is inserted after the "-s". If there is no count, the "-s" is removed. -- cgit