0

I use putty.exe in windows 7 to connect to my Linux system.
I use vi. I would like the cursor in vi to remain white all the time, and not change to green or blue around my if statement { } brackets while editing .c files. The background color in the putty ssh window is black, all the text is white, and when the cursor decides to highlight green and blue about things it hurts more than it helps. and it's not just the location of the cursor but it will highlight characters that are elsewhere nearby... like with if statement if I have something like

if ( a == b )
{
}

the { and } will get highlighted while typing and makes it very hard to tell where my cursor is positioned, because I cannot easily tell the difference between the colors.

I have edited /etc/bash.bashrc and /etc/csh.cshrc and commented out the color options for the ls command, and have edited my my ~/.vimrc file and have syntax off as the first line with nothing else below. But the cursor and text highlighting persists in vi, how do I fully disable that? thanks.

3
  • Just give a try, use vim instead of vi
    – AReddy
    Commented Feb 25, 2016 at 16:01
  • vim does the same thing :(
    – ron
    Commented Feb 25, 2016 at 16:13
  • and this is in Novel SLES 11.4 x86-64
    – ron
    Commented Feb 25, 2016 at 16:14

2 Answers 2

0

I found a solution, http://vim.wikia.com/wiki/How_to_turn_off_all_colors

edited my ~/.vimrc file and have this in there, my cursor color is still green but that's acceptable, the character highlighting no longer happens.

syntax off
set nohlsearch
set t_Co=0
0

The article Customizing/disabling VIM’s matching parenthesis highlighting gives some suggestions. The simplest one is to add this to your .vimrc file:

let g:loaded_matchparen=1 

That leaves the syntax highlighting alone.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .