Friday, March 2, 2012

Re: Which runtime files for console vim?

Hi Gary!

On Fr, 02 Mär 2012, Gary Johnson wrote:

> On 2012-03-01, howardb21 wrote:
> > On Mar 1, 7:05 pm, Gary Johnson <garyj...@spocom.com> wrote:
> > > On 2012-03-01, howardb21 wrote:
> >
> > >     Vim can display the matches in a simplistic popup menu.
> > >
> > >     The menu is used when:
> > >     - The 'completeopt' option contains "menu" or "menuone".
> > >     - The terminal supports at least 8 colors.
> > >     - There are at least two matches.  One if "menuone" is used.
> > >
> > > We know that the first and third conditions are satisfied.  Are you
> > > using a monochromatic terminal?  What does
> > >
> > >     :set t_Co?
> >
> > Yes, I know about that. I set completeopt=menu,menuone
> > Intereestingly t_Co? gives an empty value, although my samsung monitor
> > has plenty of colors.
>
> That's the problem then. With t_Co empty, Vim thinks that your
> terminal doesn't support colors and therefore doesn't display that
> menu.
>
> > Something I omitted: Vim runs the menus fine on
> > my local computer. I was asking about vim that resides on a university
> > computer running redhat linux, that I secure telnet into. There - no
> > menu. However, the spell check when I :set spell does give a numbered
> > menu, which appears to happen by vim cleaing the current screen and
> > replacing it with the menu of spelling suggestions.
> >
> > The telnet session tells redhat to use vt100 emulation. I had trouble
> > with vim's screen behaviour under emulations like vt102 vt360, ansi,
> > linux etc.
>
> You should set TERM on the remote computer to match the capabilities
> of the terminal you are using on the local computer. These days,
> setting TERM=xterm usually works pretty well. Some systems'
> terminfo databases think that xterm doesn't support colors. I don't
> think any Red Hat system should have that problem. If setting
> TERM=xterm still gives you nothing for t_Co, you can either search
> /usr/share/terminfo/x/ for a file named something like xterm-color
> and set TERM to that name, or you can set t_Co=8 or to whatever
> number of colors you think your terminal supports. See

I think all recent xterms are compiled with support for 256 colors. For
that to work, it should be sufficient to set TERM=xterm-256color. Even
putty understands those ansi color codes, I think.

If you know, your terminal supports colors or your terminfo database is
too old, try setting 'term' option to ansi and t_Co=256 which might work
and always did, when I needed it.


Mit freundlichen Grüßen
Christian
--
Wie man sein Kind nicht nennen sollte:
Phil A. Delphia

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: