Tip #126: how do I get rid of that bold stuff with my xterm?
tip karma |
Rating 49/15, Viewed by 3327
|
Read and edit this tip on the
Vim tip wiki.
The wiki may have a more recent version of this tip.
created: |
|
October 3, 2001 8:26 |
|
complexity: |
|
basic |
author: |
|
Charles E. Campbell, Jr. |
|
as of Vim: |
|
6.0 |
Having problems setting up your syntax highlighting because
everything is coming up in bold?
You're probably using an 8 color xterm and setting up highlighting
lines such as hi Normal ... ctermfg=green . The solution: use
numbers! 0=black, 1=red, 2=green, 3=yellow, 4=blue, 5=magenta,
6=cyan, and 7=white. Vim tries to use "bright" colors when its
given names (because Windoz machines prefer to use dim text unless
its been made bold).
Read more about it under :help highlight-ctermfg .
<< Auto commenting for "}" |
Preview HTML files quickly >>
Additional Notes
[email protected],
October 10, 2001 7:37
|
This works ok, but a more portable (and more predictable) way is to use the dark color names. i.e. use DarkBlue instead of Blue, Gray instead of White, etc. See :help cterm-colors.
If you are using a recent xterm try putting this in your .vimrc:
if &term; =~ "xterm"
" don't do this if you have 8-color xterms
set term=xterm-16color
endif
And you will get the non-bolded versions of those colors (which means you have 16 colors to work with)
|
|