Monday, December 10, 2007

Colors in vi

So after turning off the colors in the 'ls' command on linux, I also had to deal with the colors using vi...
When reading a logfile for example, the file is presented in 5 or 6 different colors..
To turn off these colors edit the following file (as root)...

/usr/share/vim/vim60/macros/vimrc

In this file you will see the following lines:

" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 has("gui_running")
syntax on
set hlsearch
endif

You can disable coloring by placing " in front of these lines..

" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
"if &t_Co > 2 has("gui_running")
" syntax on
" set hlsearch
"endif

Now all colors are gone, and I believe reading is much easier ....

2 comments:

Scott said...

You may also want to disable the colours on a user by user basis instead of globally. To accomplish this, create or edit the .vimrc file in the users' home directory and add the following lines at the end:

"turn off all syntax highlighting
syntax off
"turn off highlighting during a search
set nohlsearch

This will also make upgrading vim easier as you won't have to remember to edit the global vimrc file when the vim package is updated.

Microsoft Office 2007 said...

NEVERTHELESS, THE CIVIL LAW is and must be neutral about who has a more noble or rewarding faith. The breakaway parishes ought to win every Office 2010facet of the lawsuit not becauseMicrosoft Office 2010 their beliefs or their politics are better, Microsoft wordbut because both lawOffice 2007and equity, along with common sense, are on Microsoft Officetheir side.Microsoft Office 2007 Not only does Virginia state law (the Division Statute)Office 2007 keyexplicitly apply to just such a Office 2007 downloadsituation as now exists, but the history Office 2007 Professionalespecially of The Falls Church argues against the claims of Outlook 2010the Virginia Diocese with which theyMicrosoft outlookhave disassociated.Microsoft outlook 2010First, The Falls Church wasWindows 7 founded, formed, and developed long before the diocese, or the national Episcopal Church, even existed.