aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/autoload/man.vim5
-rw-r--r--runtime/doc/filetype.txt42
-rw-r--r--runtime/doc/usr_12.txt19
-rw-r--r--runtime/doc/vim_diff.txt1
4 files changed, 24 insertions, 43 deletions
diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim
index 6f50cce9dc..79931b61b1 100644
--- a/runtime/autoload/man.vim
+++ b/runtime/autoload/man.vim
@@ -27,7 +27,7 @@ function! man#open_page_command(...) abort
call s:error('too many arguments')
return
elseif a:0 ==# 0
- call s:error('what manual page do you want?')
+ call s:error('missing argument')
return
elseif a:0 ==# 1
let ref = a:000[0]
@@ -221,9 +221,8 @@ endfunction
function! s:error(msg) abort
redraw
- echon 'man.vim: '
echohl ErrorMsg
- echon a:msg
+ echon 'man.vim: ' a:msg
echohl None
endfunction
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index 644f7c23e1..92ed9de369 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -512,44 +512,36 @@ Local mappings:
MAN *ft-man-plugin* *:Man* *man.vim*
-View manpages from the comfort of vim. Features include syntax highlighting,
-smart autocompletion, multilingual support, and manpage jumping.
-Also see |find-manpage|.
+View manpages in Nvim. Supports highlighting, autocompletion, locales, and
+navigation. See also |find-manpage|.
-You can use neovim as a manpager with >
+To use Nvim as a manpager:
export MANPAGER="nvim -c 'set ft=man' -"
Commands:
-Man {name} Display the manpage for {name} in a new tab.
-Man {sect} {name} Same as above except specify the section.
-Man {name}({sect}) Alternate syntax to above. Exists so that you can see
- the section of the manpage you are completing.
-Man {sect} {name}({sect}) This is used during completion to show the real section
- of a manpage when the provided section is a prefix.
- E.g. section 1m vs 1.
-
-Man {path} Open the manpage specified by path, if it's in the current
- directory, specify the leading ./
+Man {name} Display the manpage for {name} in a window.
+Man {sect} {name} Display the manpage for {name} and section {sect}.
+Man {name}({sect}) Alternate syntax which auto-completes the section.
+Man {sect} {name}({sect}) Used during completion to show the real section of
+ when the provided section is a prefix, e.g. 1m vs 1.
+Man {path} Open the manpage specified by path. Use "./" if it
+ is in the current directory.
+
Global Mappings:
<Plug>(Man) Jump to the manpage for the <cWORD> under the
- cursor in a new tab. Takes a count as the manpage
- section.
+ cursor in a new tab. Takes a count for the section.
Local mappings:
-CTRL-] Jump to the manpage for the <cWORD> under the cursor. Takes a count
- as the manpage section.
-K Same as CTRL-].
+K
+CTRL-] Jump to the manpage for the <cWORD> under the
+ cursor. Takes a count for the section.
CTRL-T Jump back to the previous manpage.
q Close the window.
Variables:
-g:no_man_maps
- If set, no mappings are created in man buffers.
-
-g:ft_man_folding_enable
- If set to 1, manpages are folded with foldmethod=indent and
- foldnestmax=1.
+g:no_man_maps Do not create mappings in manpage buffers.
+g:ft_man_folding_enable Fold manpages with foldmethod=indent foldnestmax=1.
If you do not like the default folding, use an autocommand to add your desired
folding style instead. For example: >
diff --git a/runtime/doc/usr_12.txt b/runtime/doc/usr_12.txt
index 237abae55f..169d886e78 100644
--- a/runtime/doc/usr_12.txt
+++ b/runtime/doc/usr_12.txt
@@ -237,19 +237,8 @@ simple way: Move the cursor to the word you want to find help on and press >
K
-Vim will run the external "man" program on the word. If the man page is
-found, it is displayed. This uses the normal pager to scroll through the text
-(mostly the "more" program). When you get to the end pressing <Enter> will
-get you back into Vim.
-
-A disadvantage is that you can't see the man page and the text you are working
-on at the same time. There is a trick to make the man page appear in a Vim
-window. First, load the man filetype plugin: >
-
- :runtime! ftplugin/man.vim
-
-Put this command in your vimrc file if you intend to do this often. Now you
-can use the ":Man" command to open a window on a man page: >
+Nvim will run |:Man| on the word. If the man page is found, it is displayed.
+You can also use the |:Man| command to open a window on a man page: >
:Man csh
@@ -267,7 +256,7 @@ window.
To display a man page for the word under the cursor, use this: >
- \K
+ K
(If you redefined the <Leader>, use it instead of the backslash).
For example, you want to know the return value of "strstr()" while editing
@@ -275,7 +264,7 @@ this line:
if ( strstr (input, "aap") == ) ~
-Move the cursor to somewhere on "strstr" and type "\K". A window will open
+Move the cursor to somewhere on "strstr" and type "K". A window will open
to display the man page for strstr().
==============================================================================
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index 937ed9e8ba..47380428b0 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -96,6 +96,7 @@ Options:
Commands:
|:CheckHealth|
+ |:Man| has many improvements, including auto-completion
Functions:
|execute()| works with |:redir|