I would like to know why my vim is not using my default colorscheme, while gvim does. Here is what I did:
~/.vim/colors
~/.vim/colors
~/.vimrc
Put the following content in ~/.vimrc
colorscheme vitamins set number set smartindent set tabstop=4 set shiftwidth=4 syntax on set ignorecase set mouse=a set hlsearch`
The problem is that vim doesn't seem to use any of definitions, but Gvim does! Why? How can I make a definition file for Vim and another for Gvim? I tried to create a file ~/.gvimrc
but Gvim didn't seem to use anything from that file.
The vitamins colorscheme contains high-color cterm
definitions. You need a terminal that supports and advertises 256 colors.
:set t_Co?
must print 256. If it doesn't, you can force this via :set t_Co=256
(before the :colorscheme
command), but it's better to choose an appropriate value for $TERM
, eg gnome-256color
.
It's better to use _vimrc instead of .vimrc in windows.
For example, given below is my vim directory structure:
C:\Users\pmu\vim>dir
Volume in drive C is PC COE
Volume Serial Number is 48FC-5307
Directory of C:\Users\pmu\vim
04/25/2014 09:00 PM <DIR> .
04/25/2014 09:00 PM <DIR> ..
02/28/2014 11:52 PM <DIR> vim74
04/15/2014 11:51 PM <DIR> vimfiles
04/21/2014 02:06 PM 8,804 _vimrc
14 File(s) 41,661 bytes
6 Dir(s) 265,565,655,040 bytes free
C:\Users\pmu\vim>
It's better not to use .gvimrc ( or in case of windows _gvimrc) as some plugins might work slowly.
One more thing - I see a ` in there.
set hlsearch`
It should be:
set hlsearch
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.