Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
12-21-2007, 01:30 AM
|
#1
|
|
Member
Registered: Dec 2007
Location: Kolkata, WB,India
Posts: 30
Rep:
|
vim editor
Hi all,
I do have a demand from the users, ones who access the server thru telnet, to change the text colors of sh scripts when opened in vim editor so that they can see it more clearly................like the comments appear in blue color which is difficult to see with the background being black. so I want to change the font colors as well as the background color.
Can anybody guide me how can I do so?
An early response is appreciable.............
Thanks and regards,
Kosys
|
|
|
|
12-21-2007, 04:26 AM
|
#2
|
|
Member
Registered: Nov 2007
Location: Provo, Utah
Distribution: Debian and Ubuntu
Posts: 74
Rep:
|
|
|
|
|
12-22-2007, 01:13 PM
|
#3
|
|
Member
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 509
Rep:
|
You'll need vim syntax highlighting files - which can be locally installed into the user's home-dir into .vim/syntax/ if necessary.
If overall syntax highlighting is actually working, your user just have to enable it possibly (ESC:syn on) or put an sh.vim into the user's .vim/syntax dir as vim already supports shell scripting in color.
|
|
|
|
12-23-2007, 11:33 PM
|
#4
|
|
Member
Registered: Dec 2007
Location: Kolkata, WB,India
Posts: 30
Original Poster
Rep:
|
Hi,
Let me mention that I didn't find any .vimrc file in the users home directory. There's only one file that I found in the /etc directory is vimrc file. And the colors directory is in the path: /usr/share/vim/vim63/colors
And in the users home directory there are following files related to vim:
.viminfo
.viminfo.tmp
I also tried the following way but no effect till yet.
1. I downloaded freya.vim and put it in the path: /usr/share/vim/vim70/colors
2. And then opened the file /etc/vimrc and added the following:
if has("gui_running")
colorscheme shine
endif
but no effect till yet........
Please let me know where to add the colorscheme.....and bring the desired effect.
Regards,
Kosys
|
|
|
|
12-31-2007, 01:38 AM
|
#5
|
|
Member
Registered: Dec 2007
Location: Kolkata, WB,India
Posts: 30
Original Poster
Rep:
|
Hi!!
Please go thru my previous quote...........let me know the possible workaround........
Anxiously waiting on a proper response.
Regards,
Kosys
Last edited by kosys; 12-31-2007 at 01:52 AM.
|
|
|
|
12-31-2007, 05:30 AM
|
#6
|
|
Member
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 449
Rep:
|
Hi,
Clarifications:
- You've downloaded a colorscheme called 'freya' so, if you wanted that colorscheme, you need to add:
colorscheme freya
not shine.
- If the .vimrc doesn't exist in a user directory, you can create it and add whatever customization you want, although is not necessary since /etc/vimrc will be used as wide-system configuration file, although sometimes the file used as wide-system configuration is at /usr/share/vim/vimX/vimrc where X is vim's version.
- If you download any colorscheme, you need to put it in your current/active color path, as you said, your color path is:
/usr/share/vim/vim63/colors
So, any color scheme goes in that directory, not in vim70 unless you're actually using version 7.0 of vim.
Move the freya.vim to /usr/share/vim/vim63/colors and add the line:
colorscheme freya
If still doesn't work, you can create the .vimrc in the user directory with the same line, just remember to check the ownership of the new .vimrc created (if it's not created by the user himself)
Regards
|
|
|
|
12-31-2007, 10:48 AM
|
#7
|
|
Member
Registered: Dec 2007
Location: Brazil
Distribution: slackware 13
Posts: 151
Rep:
|
vim startup settings:
open gvim:
terminal --> user $ gvim &
menu --> edit --> startup settings
.vimrc will be locally installed into the user's home-dir
hints:
set number
set lbr
set nobackup
terminal:
user $ vimtutor
user $ man gvim
vimbook: ftp://ftp.vim.org/pub/vim/doc/book/vimbook-OPL.pdf
Last edited by marciobarbalho; 12-31-2007 at 10:50 AM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:58 AM.
|
|
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
|
|