-   SUSE / openSUSE (
-   -   How to enable color syntax when I start vim? (

ArthurHuang 01-26-2006 11:01 AM

How to enable color syntax when I start vim?
I know if I want colorful syntax, I type :syntax on when editing a specific file.
But, if I want the syntax on automatically when I start VIM, Which script should I modify?

Thanks a lot.

lugoteehalt 01-26-2006 11:06 AM

From memory you create ~/.vimrc. There will probably be an example file(s), somewhere: copy this to .vimrc and modify it to suit yourself. 'syntax on' or 'set syntax' or somthing will probably do it if you can't find an example file. There may well be several files containing diferrent themes for the syntaxing.

ArthurHuang 01-26-2006 11:18 AM

I got it from "".Now I can read colorful words:)

Thanks a lot!

ArthurHuang 01-26-2006 11:19 AM

Wait a second.
I want the shell background color is back rather than white. How to?

ArthurHuang 01-26-2006 11:30 AM

I find it. settings on toolbar:(

bigrigdriver 01-27-2006 12:10 AM

Another thing you could try. Look in /usr/share/vim/vim63/colors. There are several colorschemes, which include background, foreground, and syntax highlight.

To use a colorscheme, start vim, then from the command prompt, :colorscheme <schemename> to try one out. If you don't like it, try another with the same command.

To make it permanent, edit your .vimrc to add these lines:

syntax on
:colorscheme <schemename>

All times are GMT -5. The time now is 03:11 PM.