Editor color problem
Today i open a configuration file for change using vi. But some how i enter any key instead go to insert mode. As a result a word rpm always cbackgroud color is red. When i type any word like rpm its color is red.How can i chnage its previous color.
|
what configuration file did you open?
|
I changed sources.list file for apt.
|
That might be a keyword associated with that file type that vim recognizes, so it uses its "syntax highlighting"
|
No, the OP accidentally hit the / key, and is seeing the result of colored search results. Just perform a search for a non-existent pattern and the search highlight will off:
/asdflsfdjslf |
Mr.C is is absolutely right.
|
to turn of search highlighting just do the following :nohlsearch
if you want to automate this open ~/.vimrc and add the following function ToggleHLSearch () if $hls set nohls else set hls endif endfunction map <F4> :set hls!<CR>:set hls?<CR> this way you can turn of highlighting by just hitting F4 key. |
All times are GMT -5. The time now is 01:09 AM. |