LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 01-26-2006, 11:01 AM   #1
ArthurHuang
Member
 
Registered: Jan 2006
Posts: 174

Rep: Reputation: 30
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.
 
Old 01-26-2006, 11:06 AM   #2
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
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.
 
Old 01-26-2006, 11:18 AM   #3
ArthurHuang
Member
 
Registered: Jan 2006
Posts: 174

Original Poster
Rep: Reputation: 30
I got it from "http://www.stripey.com/vim/vimrc.html".Now I can read colorful words

Thanks a lot!
 
Old 01-26-2006, 11:19 AM   #4
ArthurHuang
Member
 
Registered: Jan 2006
Posts: 174

Original Poster
Rep: Reputation: 30
Wait a second.
I want the shell background color is back rather than white. How to?
 
Old 01-26-2006, 11:30 AM   #5
ArthurHuang
Member
 
Registered: Jan 2006
Posts: 174

Original Poster
Rep: Reputation: 30
I find it. settings on toolbar
 
Old 01-27-2006, 12:10 AM   #6
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RdHat Vim Syntax Highlighting R4z0r Linux - Software 8 09-06-2011 02:22 PM
VIM Color Syntax Highliting bsg Linux - Newbie 5 10-07-2005 09:31 PM
vim syntax highlighting MiniMe001 Linux - General 2 06-19-2005 12:08 PM
Java syntax highlighting in vim Phantomas Linux - Software 0 08-16-2003 05:34 AM
Vim syntax highlighting NSKL Linux - Software 2 11-09-2002 03:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration