

version 7.1 To use Vim as a man-page viewer involves setting an environment variable and adding a line to your. It looks like it's being caused by the ( || true) statement in the shell command, but I'm not sure where that shell command is being invoked from. created 2001 complexity intermediate author Charles E. No entry for vimtutor in section 1 of the manualĮDIT: Even with the fix described above, I'm continuing to get this error when navigating between man pages. System command (cd '/usr/share/man' & (echo ".ll 12.1i" echo ".nr LL 12.1i" /bin/cat '/usr/share/man/man1/vimtutor.1') | /usr/bin/tbl | /usr/bin/groff -Wall -mtty-char -Tascii -mandoc -c | ( || true)) exited with status 512. Now you can read syntax-highlighted man pages inside Vim by running :Man. It also improve the behavior of :Man command and mappings in man file. Sh: -c: line 0: `(cd '/usr/share/man' & (echo ".ll 12.1i" echo ".nr LL 12.1i" /bin/cat '/usr/share/man/man1/vimtutor.1') | /usr/bin/tbl | /usr/bin/groff -Wall -mtty-char -Tascii -mandoc -c | ( || true))'Įrror executing formatting or display command. vim-manpager is plugin to use Vim as a MANPAGER. An Arbys manager 'beat her hands bloody' attempting to escape a walk-in freezer she was found dead in May.

zshrc to use less as MANPAGER: export MANPAGER/usr/bin/less -s. I've found alternate settings for the MANPAGER environment variable on /r/vim and this StackExchange that make it work on macOS, but both of them cause navigation via to break and give the folllowing output: sh: -c: line 0: syntax error near unexpected token `||' Arbys manager found dead in freezer couldnt escape due to broken door, lawsuit claims. The only requirement is using less for MANPAGER. It can be fixed by replacing getline(1) with getline(nextnonblank(1)).

Manpager code#
The code below shows how I created a poor-mans pager control that uses the goto behavior. It is not used in conjunction with -f or. functionality works nicely with the scrollHorz effect. Line 18 reads: let manpage = matchstr( getline(1), '^'. This option overrides the MANPAGER environment variable, which in turn overrides the PAGER environment variable.
Manpager mac#
The line above works for me on Linux (Debian 9.2), but the same setting on a Mac (10.11 El Capitan) causes the following error every time I invoke man: Error detected while processing function 57_MANPAGER:Į15: Invalid expression: page_sec page_secĮDIT: This appears to be a bug in the $VIMRUNTIME/plugin/manpager.vim plugin. )Įxport MANPAGER="env MAN_PN=1 vim -M +MANPAGER -" The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user-space programs.
Manpager how to#
:h manpager describes how to use vim as a manpager: Works on:įor bash,zsh,ksh or dash by adding to the config file (.bashrc.zshrc.
