LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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


Reply
  Search this Thread
Old 12-21-2007, 01:30 AM   #1
kosys
Member
 
Registered: Dec 2007
Location: Kolkata, WB,India
Posts: 30

Rep: Reputation: 15
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
 
Old 12-21-2007, 04:26 AM   #2
LinuxManMikeC
Member
 
Registered: Nov 2007
Location: Provo, Utah
Distribution: Debian and Ubuntu
Posts: 74

Rep: Reputation: 15
This might help: http://tips.webdesign10.com/vimcolorschemes

Fire up Google if you need more: http://www.google.com/search?q=custom+vim+color
 
Old 12-22-2007, 01:13 PM   #3
Su-Shee
Member
 
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 510

Rep: Reputation: 53
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.
 
Old 12-23-2007, 11:33 PM   #4
kosys
Member
 
Registered: Dec 2007
Location: Kolkata, WB,India
Posts: 30

Original Poster
Rep: Reputation: 15
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
 
Old 12-31-2007, 01:38 AM   #5
kosys
Member
 
Registered: Dec 2007
Location: Kolkata, WB,India
Posts: 30

Original Poster
Rep: Reputation: 15
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.
 
Old 12-31-2007, 05:30 AM   #6
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
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
 
Old 12-31-2007, 10:48 AM   #7
marciobarbalho
Member
 
Registered: Dec 2007
Location: Brazil
Distribution: slackware 13
Posts: 151

Rep: Reputation: 30
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.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Empowering Vim Editor LXer Syndicated Linux News 0 09-14-2007 02:51 PM
vim editor keyword highlighting LinuxLover Linux - Software 2 10-29-2006 05:50 AM
vim editor shabbirhai Linux - General 5 03-02-2006 02:01 AM
Using Visual in VIM editor manikantha Linux - General 4 06-10-2005 08:55 AM
Configuration for VIM editor ICO Linux - General 5 08-02-2003 08:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:06 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