Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-31-2010, 10:01 AM
|
#1
|
LQ Newbie
Registered: Dec 2009
Location: Cleveland
Posts: 16
Rep:
|
Set VI environment - color and format
All,
wondering what I need to do to make my VI scripts better formatted. The colorized commands, etc.., and the indents where necessary. Hope this question makes sense.
I am running Fedora and Redhate Ent 5.
thx much..
|
|
|
01-31-2010, 10:16 AM
|
#2
|
Member
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX, OS X
Posts: 567
Rep:
|
I use nano for scripting so I don't have to worry about all that. It doesn't show colors but it does format nicely.
|
|
|
01-31-2010, 11:14 AM
|
#3
|
LQ Newbie
Registered: Dec 2009
Location: Cleveland
Posts: 16
Original Poster
Rep:
|
I got my line numbering to work in VI, but still not the coloring. I understand I will have to at somepoint edit a file to make this default for VI.
Last edited by Morgandy; 01-31-2010 at 11:30 AM.
|
|
|
01-31-2010, 11:28 AM
|
#4
|
LQ Newbie
Registered: Dec 2009
Location: Cleveland
Posts: 16
Original Poster
Rep:
|
Nevermind on the latter, VI scripting....didn't realize I need the ./filename instead of just typeing filename! Whew...made me crazy.
|
|
|
01-31-2010, 06:35 PM
|
#5
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,441
|
|
|
|
01-31-2010, 06:56 PM
|
#6
|
Member
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX, OS X
Posts: 567
Rep:
|
Thanks to your thread I got to thinking about syntax highlighting and sorted out for nano.
it is much easier in vi/vim. Edit ~/.vimrc and just add syntax on and save the file. Thats it.
|
|
|
01-31-2010, 06:59 PM
|
#7
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
If you look in /usr/share/vim/vim72 (or whichever version you have installed), there is a subdirectory named colors. In that directory are several colorschemes.
In you /home/<username>/.vimrc, you add an entry:
:colorscheme blue
and save the file.
Thereafter, when you start vim, that colorscheme will be used to colorize your text files.
|
|
|
All times are GMT -5. The time now is 10:12 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|