How to change vi/vim color setting
I have changed my background color of xterm/konsole to black (better for eye since i got to face monitor for long hour).
In my vi file, there is a color setting to put all comment # with deep blue color. This make it very difficult to see if the blackground color is black color. How could i change color setting in vi or vim ? I want to change the blue color to cyan. |
Have a good look through here https://code.google.com/p/vimcolorschemetest/ & http://www.vim.org/
|
The vim already has different colors.
For example: the # (comment) is deep blue color, number is red color, bracket is brown color. What file should I change so that i could modify the comment color from deep blue to cyan. |
|
at my home
mkdir .vim cd .vim mkdir .syntax cd .syntax cp /usr/share/vim/vim70/syntax/syncolor.vim . try to modify the syncolor.vim file. But the vim color does not change. will the system look for my local syncolor.vim file? |
at home
vi .vimrc highlight comment ctermfg=lightblue |
Sorry, I don't know about syntax files.
The vim :highlight command shows names and associated colours. The terminal can handle as many colours as are shown by tput colors /usr/share/vim/vim72/colors/* files are useful examples. To experiment with vim colours, copy a /usr/share/vim/vim72/colors/* file to ~/.vim/colors and modify it. In ~/.vimrc, try set background=dark and see if vim adjusts itself (didn't work for me). Here are some .vimrc color adjustments but mostly for light background so only useful as examples Code:
"hi LineNr ctermfg=grey guifg=grey |
thank you very much :)
i only change this vi .vimrc highlight comment ctermfg=lightblue it works :) |
Glad you found a solution and thanks for sharing it.
Threads can be marked SOLVED via the Thread Tools menu. |
All times are GMT -5. The time now is 01:00 PM. |