On 19/05/10 09:34, Ajay Jain wrote:
Hi,

I am not able to see any color when I select a line using Shift-V.
Similarly if I select a few lines using mouse, I do not see any color
there as well. I believe I need to change hi Visual .. However, I have
tried various colors but of no use. What is the right way?

Thanks,
Ajay.


To see colors with or without Shift-V you need at least ":syntax on" in your vimrc. (":filetype plugin on", or even ":filetype plugin indent on", is also useful.) If you source the vimrc_example.vim it does it all for you.

With those set, I cannot reproduce your problem: in console mode the Visual highlight uses reverse-video, and the background takes up the colours normally used by the text. In GUI mode, the Visual highlight has a grey background (LightGrey, it is called) and the foreground text colours are still visible.

I tested it by bringing up the help (using F1) and then hitting Shift-v for linewise Visual: the name of the file at left and the Vim version in the middle are still different colours than the rest, with or without the Visual highlight.

The default Visual highlight is
        :hi Visual term=reverse cterm=reverse guibg=LightGrey
and it's good enough as it is.

Of course if you have set a color scheme it may change the Visual highlight to something which won't let you see the underlying text colours. You can see the current colour and where it was set, by using

        :verbose hi Visual

(except than on very old Vim versions, :verbose won't tell you were a highlight was set).

Which version are you using? (I'm on Linux, currently testing the first advance versions of Vim 7.3a with GTK2 GUI, but in 7.2.xxx I saw the same thing.)


Best regards,
Tony.
--
WOMAN:   I didn't know we had a king. I thought we were an autonomous
         collective.
DENNIS:  You're fooling yourself.  We're living in a dictatorship.  A
         self-perpetuating autocracy in which the working classes--
WOMAN:   Oh there you go, bringing class into it again.
DENNIS:  That's what it's all about if only people would--
The Quest for the Holy Grail (Monty Python)

--
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

Reply via email to