On 03/02/09 09:50, Elias Diem wrote:
> Hi all,
>
> Using K in normal mode to look up a keyword under the cursor works well when I
> use vim in a terminal.
> However when I use gvim and do the same thing, I get the following warning:
> WARNING: terminal is not fully functional
>
> The man pages look odd then with weird characters inserted.
>
> Is there a solutions to this?
>
> I use vim 7.0, the debian etch package.
>
> Thanks for any help,
> Elias

IIUC, the reason is that when invoking the shell, gvim gives that shell 
a "dumb" terminal, which emulates a teletypewriter: it can move the 
"paper" forward but not backward, it cannot "clear the screen", and it 
cannot "go to" an arbitrary line & column; I'm not sure whether it has 
colour and/or bold/underline/italic capabilities. Now the "man" program 
expects its $MANPAGER to be the "less" program, or a reasonable 
substitute for it, and "less" expects a video terminal working like a 
"text-mode TV", not like a teletypewriter.

The weird characters are ANSI sequences used to set or clear boldface 
and underline display modes: IIUC most video terminals can be set to 
accept them, sometimes with the help of some "device driver" such as 
(for MS-DOS) ANSI.SYS used to be.

IMHO, when using gvim, you had better run "man" in a separate xterm or 
similar window (though it would not allow getting the manpage for the 
word under the cursor, except via an additional paste operation), or 
else, use Console Vim rather than gvim if you expect to be able to get 
that functionality.

I think there are settings (but I don't know what) to tell man to avoid 
bold & underline, and you might try setting $MANPAGER to more when 
running "man" from gvim, but the latter would mean reading the man page 
from begin to end, never going back.


Best regards,
Tony.
-- 
BROTHER MAYNARD: Armaments Chapter Two Verses Nine to Twenty One.
ANOTHER MONK:    And St.  Attila raised his hand grenade up on high 
saying "O
                  Lord bless this thy hand grenade that with it thou mayest
                  blow thine enemies to tiny bits, in thy mercy. "and 
the Lord
                  did grin and people did feast upon the lambs and 
sloths and
                  carp and anchovies and orang-utans and breakfast 
cereals and
                  fruit bats and...
BROTHER MAYNARD: Skip a bit brother ...
                  "Monty Python and the Holy Grail" PYTHON (MONTY) 
PICTURES LTD

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to