Why can't `$ man` find the location of a page outside the first section when Vim was started as a manpager?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm trying to debug an issue with the man Neovim plugin.
At :h ft-man-plugin
, Neovim recommends to export this variable to use it as a manpager:
export MANPAGER='nvim +Man!'
But if I execute $ man man
from the shell, then :Man mount
from Neovim, the latter raises this error:
man.vim: command error (11) man -w mount: No manual entry for mount
See 'man 7 undocumented' for help when manual pages are not available.
I've been able to reproduce the issue with this minimal example:
$ MANPAGER='vim -Nu NONE -' man man
:!man -w mount
The first shell command starts the $ man
command, using Vim as a manpager (although, here, it's not configured correctly to display the page).
The second Vim command asks a shell to execute $ man -w mount
to find the location of the page for the $ mount
command. Here is its output:
No manual entry for mount
See 'man 7 undocumented' for help when manual pages are not available.
shell returned 16
I've also tried with Neovim instead of Vim, and with system()
instead of :!
(i.e. :echo system('man -w mount')
), but the result is always the same; $ man
doesn't find the page for the $ mount
command.
The issue disappears if (Neo)Vim is started directly with the $ vim
(or $ nvim
) command instead of indirectly via $MANPAGER
.
So these commands correctly find the location of the $ mount
command:
$ zcat /usr/share/man/man1/man.1.gz | vim -Nu NONE -
:!man -w mount
It also disappears if I ask for a page from the first section of the manual.
So these commands correctly find the location of the $ ls
command:
$ MANPAGER='vim -Nu NONE -' man man
:!man -w ls
It also disappears if I manually provide the section number of the page.
So these commands correctly find the location of the $ mount
command:
$ MANPAGER='vim -Nu NONE -' man man
:!man -s8 -w mount
The issue happens only when (Neo)Vim is started as a manpager and I ask $ man
to find a page outside the first section of the manual, without providing the section number of the page.
Here are some information about my machine:
vim --version
: VIM - Vi IMproved 8.1 Included patches: 1-495- Operating system: Ubuntu 16.04.5 LTS
- Terminal emulator: rxvt-unicode v9.22
- Terminal multiplexer: tmux 2.8
$TERM
: tmux-256color- Shell: zsh 5.6.2-dev-0 (x86_64-pc-linux-gnu)
Why can't $ man
find the pages outside the first section when Vim was started as a manpager?
vim man
add a comment |Â
up vote
0
down vote
favorite
I'm trying to debug an issue with the man Neovim plugin.
At :h ft-man-plugin
, Neovim recommends to export this variable to use it as a manpager:
export MANPAGER='nvim +Man!'
But if I execute $ man man
from the shell, then :Man mount
from Neovim, the latter raises this error:
man.vim: command error (11) man -w mount: No manual entry for mount
See 'man 7 undocumented' for help when manual pages are not available.
I've been able to reproduce the issue with this minimal example:
$ MANPAGER='vim -Nu NONE -' man man
:!man -w mount
The first shell command starts the $ man
command, using Vim as a manpager (although, here, it's not configured correctly to display the page).
The second Vim command asks a shell to execute $ man -w mount
to find the location of the page for the $ mount
command. Here is its output:
No manual entry for mount
See 'man 7 undocumented' for help when manual pages are not available.
shell returned 16
I've also tried with Neovim instead of Vim, and with system()
instead of :!
(i.e. :echo system('man -w mount')
), but the result is always the same; $ man
doesn't find the page for the $ mount
command.
The issue disappears if (Neo)Vim is started directly with the $ vim
(or $ nvim
) command instead of indirectly via $MANPAGER
.
So these commands correctly find the location of the $ mount
command:
$ zcat /usr/share/man/man1/man.1.gz | vim -Nu NONE -
:!man -w mount
It also disappears if I ask for a page from the first section of the manual.
So these commands correctly find the location of the $ ls
command:
$ MANPAGER='vim -Nu NONE -' man man
:!man -w ls
It also disappears if I manually provide the section number of the page.
So these commands correctly find the location of the $ mount
command:
$ MANPAGER='vim -Nu NONE -' man man
:!man -s8 -w mount
The issue happens only when (Neo)Vim is started as a manpager and I ask $ man
to find a page outside the first section of the manual, without providing the section number of the page.
Here are some information about my machine:
vim --version
: VIM - Vi IMproved 8.1 Included patches: 1-495- Operating system: Ubuntu 16.04.5 LTS
- Terminal emulator: rxvt-unicode v9.22
- Terminal multiplexer: tmux 2.8
$TERM
: tmux-256color- Shell: zsh 5.6.2-dev-0 (x86_64-pc-linux-gnu)
Why can't $ man
find the pages outside the first section when Vim was started as a manpager?
vim man
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to debug an issue with the man Neovim plugin.
At :h ft-man-plugin
, Neovim recommends to export this variable to use it as a manpager:
export MANPAGER='nvim +Man!'
But if I execute $ man man
from the shell, then :Man mount
from Neovim, the latter raises this error:
man.vim: command error (11) man -w mount: No manual entry for mount
See 'man 7 undocumented' for help when manual pages are not available.
I've been able to reproduce the issue with this minimal example:
$ MANPAGER='vim -Nu NONE -' man man
:!man -w mount
The first shell command starts the $ man
command, using Vim as a manpager (although, here, it's not configured correctly to display the page).
The second Vim command asks a shell to execute $ man -w mount
to find the location of the page for the $ mount
command. Here is its output:
No manual entry for mount
See 'man 7 undocumented' for help when manual pages are not available.
shell returned 16
I've also tried with Neovim instead of Vim, and with system()
instead of :!
(i.e. :echo system('man -w mount')
), but the result is always the same; $ man
doesn't find the page for the $ mount
command.
The issue disappears if (Neo)Vim is started directly with the $ vim
(or $ nvim
) command instead of indirectly via $MANPAGER
.
So these commands correctly find the location of the $ mount
command:
$ zcat /usr/share/man/man1/man.1.gz | vim -Nu NONE -
:!man -w mount
It also disappears if I ask for a page from the first section of the manual.
So these commands correctly find the location of the $ ls
command:
$ MANPAGER='vim -Nu NONE -' man man
:!man -w ls
It also disappears if I manually provide the section number of the page.
So these commands correctly find the location of the $ mount
command:
$ MANPAGER='vim -Nu NONE -' man man
:!man -s8 -w mount
The issue happens only when (Neo)Vim is started as a manpager and I ask $ man
to find a page outside the first section of the manual, without providing the section number of the page.
Here are some information about my machine:
vim --version
: VIM - Vi IMproved 8.1 Included patches: 1-495- Operating system: Ubuntu 16.04.5 LTS
- Terminal emulator: rxvt-unicode v9.22
- Terminal multiplexer: tmux 2.8
$TERM
: tmux-256color- Shell: zsh 5.6.2-dev-0 (x86_64-pc-linux-gnu)
Why can't $ man
find the pages outside the first section when Vim was started as a manpager?
vim man
I'm trying to debug an issue with the man Neovim plugin.
At :h ft-man-plugin
, Neovim recommends to export this variable to use it as a manpager:
export MANPAGER='nvim +Man!'
But if I execute $ man man
from the shell, then :Man mount
from Neovim, the latter raises this error:
man.vim: command error (11) man -w mount: No manual entry for mount
See 'man 7 undocumented' for help when manual pages are not available.
I've been able to reproduce the issue with this minimal example:
$ MANPAGER='vim -Nu NONE -' man man
:!man -w mount
The first shell command starts the $ man
command, using Vim as a manpager (although, here, it's not configured correctly to display the page).
The second Vim command asks a shell to execute $ man -w mount
to find the location of the page for the $ mount
command. Here is its output:
No manual entry for mount
See 'man 7 undocumented' for help when manual pages are not available.
shell returned 16
I've also tried with Neovim instead of Vim, and with system()
instead of :!
(i.e. :echo system('man -w mount')
), but the result is always the same; $ man
doesn't find the page for the $ mount
command.
The issue disappears if (Neo)Vim is started directly with the $ vim
(or $ nvim
) command instead of indirectly via $MANPAGER
.
So these commands correctly find the location of the $ mount
command:
$ zcat /usr/share/man/man1/man.1.gz | vim -Nu NONE -
:!man -w mount
It also disappears if I ask for a page from the first section of the manual.
So these commands correctly find the location of the $ ls
command:
$ MANPAGER='vim -Nu NONE -' man man
:!man -w ls
It also disappears if I manually provide the section number of the page.
So these commands correctly find the location of the $ mount
command:
$ MANPAGER='vim -Nu NONE -' man man
:!man -s8 -w mount
The issue happens only when (Neo)Vim is started as a manpager and I ask $ man
to find a page outside the first section of the manual, without providing the section number of the page.
Here are some information about my machine:
vim --version
: VIM - Vi IMproved 8.1 Included patches: 1-495- Operating system: Ubuntu 16.04.5 LTS
- Terminal emulator: rxvt-unicode v9.22
- Terminal multiplexer: tmux 2.8
$TERM
: tmux-256color- Shell: zsh 5.6.2-dev-0 (x86_64-pc-linux-gnu)
Why can't $ man
find the pages outside the first section when Vim was started as a manpager?
vim man
vim man
edited 16 secs ago
asked 6 mins ago
user938271
18917
18917
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f477855%2fwhy-cant-man-find-the-location-of-a-page-outside-the-first-section-when-vim%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password