LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   vim editor (https://www.linuxquestions.org/questions/linux-general-1/vim-editor-608290/)

kosys 12-21-2007 01:30 AM

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

LinuxManMikeC 12-21-2007 04:26 AM

This might help: http://tips.webdesign10.com/vimcolorschemes

Fire up Google if you need more: http://www.google.com/search?q=custom+vim+color

Su-Shee 12-22-2007 01:13 PM

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.

kosys 12-23-2007 11:33 PM

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

kosys 12-31-2007 01:38 AM

Hi!!

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

Anxiously waiting on a proper response.

Regards,
Kosys

Acron_0248 12-31-2007 05:30 AM

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

marciobarbalho 12-31-2007 10:48 AM

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


All times are GMT -5. The time now is 05:35 AM.