LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-01-2008, 11:46 PM   #1
chandan_shetty
LQ Newbie
 
Registered: Feb 2008
Posts: 16

Rep: Reputation: 0
Red face About vi editor


The vi editor is not colour full it displays text in black colour.......
for example
int a,b;
"int" is in black colour. I want vi editor to be colourfull so it is easy for me to debug the programs...so please help me to solve this problem.
 
Old 03-01-2008, 11:51 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Use vim, turn syntax highlighting on.
Code:
:syntax on
or put the following into your ~/.vimrc
Code:
if &t_Co > 1
syntax enable
endif
Cheers,
Tink
 
Old 03-01-2008, 11:53 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The quickest solution is to copy /usr/share/vim/vim71/vimrc_example.vim to ~/.vimrc. This will give you syntax highlighting for a number of languages including C, Python, bash and others. When you load in a file a vim script will determine the type of file and the syntax highlighting to use.

Your version of vim might vary. "locate vimrc_" should find the file quickly.
 
Old 03-03-2008, 01:25 PM   #4
chandan_shetty
LQ Newbie
 
Registered: Feb 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Smile

thnks its working.......
 
  


Reply



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
C++ editor nostromo Linux - Software 1 11-27-2006 11:41 AM
vi editor IwantLINUX Linux - Newbie 8 06-28-2005 10:28 AM
C++ editor onelung02 Programming 12 05-11-2005 01:51 AM
C editor MassiveBlood Linux - Software 3 10-16-2004 08:24 AM
vi editor ?? johnyy Linux - Software 3 07-13-2003 01:40 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:18 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
Open Source Consulting | Domain Registration