Benji Fisher wrote:

    I understand some of what is going on, but not all.

    The part I did not snip seems to be where the problem is.  When I
try it, I get something similar but with 1323 more lines, presumably the
whole man page, instead of 17 lines.

    The GetPage() function is defined in the default ftplugin/man.vim ;
the <SNR>6_ part means that it is a script-local function (defined as
s:GetPage() ) and this is the sixth script that was :source'd when you
started vim.  (You can confirm this with :scriptnames .)  Looking at
$VIMRUNTIME/ftplugin/man.vim and the definition of s:GetPage() (well, it
is defined as <SID>GetPage(), close enough), I see the line

 silent exec "r!/usr/bin/man ".s:GetCmdArg(sect, page)." | col -b"

and this is what calls "man cvs", filters it through "col -b" (to remove
backspaces and other nasties), and reads it into the empty buffer.

    I think this is important, but I do not understand it completely.
When I try

$ man cvs | col -b | less

or simply

$ man cvs | less

I get a similar error message, "Error executing formatting or display
command ... " after I exit less.  I guess that was sent to stderr?  (I
am pretty sure that man is /usr/bin/man .)  So somehow vim is reading
stderr into your buffer instead of stdout?

    Again, maybe someone else can figure this out.  If not, here are
some more things to try as we attempt to figure out what is going wrong.

$ vim -u NONE
:runtime ftplugin/man.vim
:Man cvs

This will start up vim without your usual vimrc file.  Is the problem
still there?
Almost the same thing. It first says "Output is not a terminal" then when I type something
it shows the same ugly buffer from my first post.

If the problem goes away, maybe you have some weird
setting for your 'shellredir' option or something.  What does

:set shell? shellredir?
:echo $SHELL

tell you?

shell=/bin/bash
shellredir=>%s 2>&1
/bin/bash

    Next, you can try (from an empty buffer)

:r! man cvs

or

:r! man cvs | col -b

Do you get the same error message, or do you get the man page?
I get the same error messages and partial unformatted man page.

Part of the error message is:
Error executing formatting or display command.
System command (cd /usr/share/man && (echo ".pl 11i"; /usr/bin/gunzip -c '/usr/share/man/man1/cvs.1.gz') | /usr/bin/gtbll | /usr/bin/nroff -c --legacy ISO-8859-1 -mandoc 2>/dev/null | col -b | view -c 'set ft=man nomod nolist' -) exited with status 256.
No manual entry for cvs

When I run that command from the shell I get the man page formatted perfectly. So I wonder what program is exiting with status 256 and what that particular error code means.

BTW, I had to make a symbol link from gtbl to gtbll, since I didn't have gtlbll.

Thanks for your help.

Reply via email to