Re: Can't change search background color
On Tue, Nov 21, 2006 at 03:25:13AM -0600, Larry Alkoff wrote: I'm using Vim64 in Kubuntu and cannot change the color background when doing a search. The background color is a kind of darkish orange - I _think_ it's numbe 3. I'd like to have LightYellow but nothing I have done so far changes it. From my ~/.vimrc: set hlsearch toggle hlsearch in normal mode: map F1 :set hlsearch!CR or insert mode with imap: imap F1 ESC:set hlsearch!CRa result of :hi search is xxx term=reverse ctermbg=3 (orangy) 14 is ltyellow None of the below worked hi search guibg=LightBlue hi Search guifg=#ec guibg=#c4a000 hi Search guibg=14 Any ideas how to change the background? Larry It helps to be clear about what you have typed and what vim responds, as in :hi search Search xxx term=reverse ctermfg=0 ctermbg=14 guibg=Yellow instead of mixing your comments (such as results of ... is and (orangy) 14 is ltyellow. I suggest using :redir and the :Echo command from foo.vim, my file of example vim functions: http://www.vim.org/script.php?script_id=72 I am guessing that you are using vim, not gvim. If I ma right, then chaining guibg is not going to help. Try :hi Search ctermbg=14 instead. :help :hi in general and :help highlight-args in particular. HTH --Benji Fisher
Re: Can't change search background color
Larry Alkoff [EMAIL PROTECTED] 写于 2006-11-21 17:25:13: I'm using Vim64 in Kubuntu and cannot change the color background when doing a search. The background color is a kind of darkish orange - I _think_ it's numbe 3. I'd like to have LightYellow but nothing I have done so far changes it. result of :hi search is xxx term=reverse ctermbg=3 (orangy) 14 is ltyellow Usually, it is impossible to set a ctermbg to 8 or above for terminals, especially when you have t_Co=8, i.e. your terminal is 8-color terminal. Sometimes, manually :set t_Co=16 does the trick, if that works for you, then just do it. But it may not work. If you still want a light background, there're several solutions: 1. Get a terminal emulator with fully 16-color support, or even 256-color terminal emulator which has support for ctermbg = 8. --- this works for yourself. 2. Do not use ctermbg = 8 when designing color schemes. Note this is important if you want your color scheme portable, because many terminal emulators cannot have light background. --- this works for everyone. HTH. -- Sincerely, Pan, Shi Zhu. ext: 2606