Re: GVim colours
Hi A.J.Mechelynck, you wrote: 3. replace the arguments of guibg= and guifg= by their #RRGGBB hex equivalents from the rxvt color palette. What these equivalents are, I don't know; but you can set any 32-bit color that way. If you want it to be usable (without dithering) on a 256-color terminal, you should use red, green and blue components, each of which is a multiple of 0x33 (i.e., 00 33 66 99 CC or FF). Also, when choosing a color, it might make sense to take a look at file $VIMRUNTIME/rgb.txt which contains standard color names supported by VIM and which can be used in your colorschemes. Some time ago I wrote a function which makes viewing the rgb.txt file more useful: ---%--%--%--%--%--%--%--%--%--%--- function! Byte2Hex(byte) let hex_chars = '0123456789ABCDEF' return hex_chars[a:byte / 16] . hex_chars[a:byte % 16] endfunction function! RGBHighlight() let line_idx = 1 let num_lines = line($) while line_idx = num_lines let line = getline(line_idx) let line_idx = line_idx + 1 if line =~ '^\s*\d\+\s\+\d\+\s\+\d\+\s\+.*$' let r = substitute(line, '^\s*\(\d\+\)\s\+\(\d\+\)\s\+\(\d\+\)\s\+.*$', '\1', ) let g = substitute(line, '^\s*\(\d\+\)\s\+\(\d\+\)\s\+\(\d\+\)\s\+.*$', '\2', ) let b = substitute(line, '^\s*\(\d\+\)\s\+\(\d\+\)\s\+\(\d\+\)\s\+.*$', '\3', ) let hlcolor = Byte2Hex(r) . Byte2Hex(g) . Byte2Hex(b) let hlname = 'RGB' . hlcolor if !hlexists(hlname) exec highlight . hlname . guifg=# . hlcolor exec syntax match . hlname . ' /^\s*' . r. '\s\+' . g . '\s\+' . b . '\s\+.*$/' endif endif endwhile endfunction call RGBHighlight() ---%--%--%--%--%--%--%--%--%--%--- You can put it into a file, say, ~/rgb.vim and do :e $VIMRUNTIME/rgb.txt :source ~/rgb.vim It will work absolutely correct only in Vim 7 since Vim 6 has support for very limited amount of syntax highlighting groups. P.S. Tony, in the text above by you I mean the original poster, not you. :-) -- Alexei Alexandrov
GVim colours
I've been using Vim with colorscheme evening, run in gnome-terminal set to disallow bold text and to use the Rxvt colour palette, and it's been working great for me. So great, in fact, that now, when I want to give GVim a chance, I can't stand its default interpretation of the evening colorscheme, but I have no idea how to make it drop the bold text and use the Rxvt colour palette. Is it at all doable? If so, how? Or, to rephrase my question, how to make GVim (below) look the same as Vim (above) in the following screenshot? http://shot.pl/gvim-colours.png -- Shot -- It is not yet possible to change operating system by writing to /proc/sys/kernel/ostype. -- man 2 sysctl
Re: GVim colours
Shot (Piotr Szotkowski) wrote: I've been using Vim with colorscheme evening, run in gnome-terminal set to disallow bold text and to use the Rxvt colour palette, and it's been working great for me. So great, in fact, that now, when I want to give GVim a chance, I can't stand its default interpretation of the evening colorscheme, but I have no idea how to make it drop the bold text and use the Rxvt colour palette. Is it at all doable? If so, how? Or, to rephrase my question, how to make GVim (below) look the same as Vim (above) in the following screenshot? http://shot.pl/gvim-colours.png -- Shot 1. copy the colorscheme to ~/.vim/colors/, possibly under a different name. 2. :%s/\bold\/NONE/g 3. replace the arguments of guibg= and guifg= by their #RRGGBB hex equivalents from the rxvt color palette. What these equivalents are, I don't know; but you can set any 32-bit color that way. If you want it to be usable (without dithering) on a 256-color terminal, you should use red, green and blue components, each of which is a multiple of 0x33 (i.e., 00 33 66 99 CC or FF). 4. If in (1) above you changed the name, alter the :colorscheme statement in your vimrc accordingly. Under (2) and (3) above you may have to add :highlight commands for any groups which the evening colorscheme would leave at their default, especially if the default is bold. Best regards, Tony. -- The capacity of human beings to bore one another seems to be vastly greater than that of any other animals. Some of their most esteemed inventions have no other apparent purpose, for example, the dinner party of more than two, the epic poem, and the science of metaphysics. -- H. L. Mencken
Re: GVim colours
I've written a script to remove all the gui=bold properties, please be ware that it isn't easy, since you cannot just set all the highlighting to gui=NONE. For those who had a default value of gui=reverse, you should NOT set it to gui=NONE, for those who had gui=reverse,bold, you should first set gui=NONE and then set gui=reverse again. Well, I really HATE the way to do that since it seems to be a dirty and hacked way, but unfortuanately it is the only way for gvim now, I strongly hope the next Vim version will have a much clean way to disable all the bold font. An alternative solution, is to use a bold font for the default font of gVim. And then all text will be highlight as the same thickness. Again, this is not a very satisfying approach but it might work for some people. -- Sincerely, Pan, Shi Zhu. ext: 2606 news [EMAIL PROTECTED] wrote on 2007-02-04 20:00:18: I've been using Vim with colorscheme evening, run in gnome-terminal set to disallow bold text and to use the Rxvt colour palette, and it's been working great for me. So great, in fact, that now, when I want to give GVim a chance, I can't stand its default interpretation of the evening colorscheme, but I have no idea how to make it drop the bold text and use the Rxvt colour palette. Is it at all doable? If so, how? Or, to rephrase my question, how to make GVim (below) look the same as Vim (above) in the following screenshot? http://shot.pl/gvim-colours.png -- Shot -- It is not yet possible to change operating system by writing to /proc/sys/kernel/ostype. -- man 2 sysctl