Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 12-21-2007, 01:30 AM   #1
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 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,
Old 12-21-2007, 04:26 AM   #2
Registered: Nov 2007
Location: Provo, Utah
Distribution: Debian and Ubuntu
Posts: 74

Rep: Reputation: 15
This might help:

Fire up Google if you need more:
Old 12-22-2007, 01:13 PM   #3
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 509

Rep: Reputation: 41
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
Registered: Dec 2007
Location: Kolkata, WB,India
Posts: 30

Original Poster
Rep: Reputation: 15

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:


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

but no effect till yet........

Please let me know where to add the colorscheme.....and bring the desired effect.

Old 12-31-2007, 01:38 AM   #5
Registered: Dec 2007
Location: Kolkata, WB,India
Posts: 30

Original Poster
Rep: Reputation: 15

Please go thru my previous quote...........let me know the possible workaround........

Anxiously waiting on a proper response.


Last edited by kosys; 12-31-2007 at 01:52 AM.
Old 12-31-2007, 05:30 AM   #6
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33


- 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:


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)

Old 12-31-2007, 10:48 AM   #7
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

set number
set lbr
set nobackup

user $ vimtutor
user $ man gvim


Last edited by marciobarbalho; 12-31-2007 at 10:50 AM.


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

All times are GMT -5. The time now is 05:42 PM.

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