 |
Breaking
eBusiness and Search News |
|
 |
Controlling Linux Colors In Vi (vim)
Because of an old application that apparently partially looks at termcap and partially hard-codes terminal info, a customer has to set TERM=ansi when using Alphacom to access his Linux box.
The Linux colorizing fouls things up royally. You can shut off command line colorizing by editing /etc/DIR_COLORS and changing "COLOR ttty" to "COLOR none" or (less drastically) by removing the "TERM ansi" line from the same file (which removes colorization for ansi but doesn't affect console use).
But that still leaves vi messing things up. The fix for that is to add
set t_Co=2
to the top of /etc/vimrc. I attempted to do this in ~/.vimrc but couldn't make it work, and also tried
if &term=="ansi"
  set t_Co=2
endif
in /etc/vimrc but that didn't work either.. not sure why yet. The idea there would be to let vim colorize if not using ansi, though in my case forcing it is fine because I don't want colors in vi ever.
I have seen the suggestion to "set syntax off"; that didn't work for me or the customer.
To my mind, colorizing is pretty messed up..
*Originally published at APLawrence.com Receive
Our Daily Email of Breaking eBusiness News
About the Author:
A.P. Lawrence provides SCO Unix and Linux consulting services http://www.pcunix.com
WebProNews RSS Feed
More Articles
Contact WebProNews |
|
|
eBUSINESS
RESOURCES |
|
|
 |
|
| About
WebProNews |
WebProNews is the number
one source for eBusiness News. Over 5 million eBusiness professionals read
WebProNews and other iEntry business and tech publications.
WebProNews provides real-time coverage of internet
business.
Free Email Newsletters:
|
|
|
|