Question

I’ve tried to set color of vim for editing C program text file.

My .vimrc is below.

[.vimrc]

set nu
colorscheme delek
syntax on

And delek.vim file is as follwing list.

ls -la /usr/share/vim/vim72/colors
total 80
drwxr-xr-x.  2 root root 4096 Jun 14  2013 .
drwxr-xr-x. 16 root root 4096 Jun 14  2013 ..
-rw-r--r--.  1 root root 2476 Apr  5  2012 blue.vim
-rw-r--r--.  1 root root 2990 Apr  5  2012 darkblue.vim
-rw-r--r--.  1 root root  548 Apr  5  2012 default.vim
-rw-r--r--.  1 root root 2399 Apr  5  2012 delek.vim
-rw-r--r--.  1 root root 2812 Apr  5  2012 desert.vim
-rw-r--r--.  1 root root 1666 Apr  5  2012 elflord.vim
-rw-r--r--.  1 root root 2476 Apr  5  2012 evening.vim
-rw-r--r--.  1 root root 3306 Apr  5  2012 koehler.vim
-rw-r--r--.  1 root root 2460 Apr  5  2012 morning.vim
-rw-r--r--.  1 root root 2006 Apr  5  2012 murphy.vim
-rw-r--r--.  1 root root 1037 Apr  5  2012 pablo.vim
-rw-r--r--.  1 root root 2673 Apr  5  2012 peachpuff.vim
-rw-r--r--.  1 root root 2311 Apr  5  2012 README.txt
-rw-r--r--.  1 root root 1239 Apr  5  2012 ron.vim
-rw-r--r--.  1 root root 2720 Apr  5  2012 shine.vim
-rw-r--r--.  1 root root 2445 Apr  5  2012 slate.vim
-rw-r--r--.  1 root root 1629 Apr  5  2012 torte.vim
-rw-r--r--.  1 root root 1840 Apr  5  2012 zellner.vim
$ 

After setting, I re-login and edit C source.

But no words are colored while there is a line under words.

How can I set it?

Was it helpful?

Solution

Check the output of

:set t_Co?

It should print 16 or 256. If not, your terminal isn't properly detected, and you should check your $TERM value. The :highlight command will quickly show you what colors and attributes are available. Also check whether other applications (e.g. mc or htop) can display colors.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top