color highlight in VIM - howyoudothat?
Guys,
I recently installed vim on a server at work. When I edit a source code file with vim, I see various fonts (plain and bold) in various shades of grey. However, on my A2 Web Hosting shell account, when I vim a file, I see pretty colors. What do I have to do to see pretty colors on a vim screen on my server at work? I have my bash shell showing pretty colors, so I know the problem is not with my terminal window (WRQ Reflections for Unix/Digital). TIA, chewy |
IIRC, you go into vim and type :syntax=on to enable syntax highlighting by file.
(I think... Mine just keeps telling me that "E319: Sorry, the command is not available in this version" so I can't check.) Oh, and there should be a file in your $HOME called .vimrc (IIRC) that you can add this to, so that it's always on. /* Prays that he's got this right... */ |
When in vim, try this:
Type : to get a command line, Type 'runtime syntax/colortest.vim' to make sure you do in fact have the ability to display color from the server. (I know you said it did, but just to be sure! :) ) If the above worked, try editing the .vimrc file in your home directory to include the following lines: Code:
" Set syntax highlighting to always on To see all available colorschemes, see this page: http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/index-pl.html I will warn you that the page may take a long time to load on a slow connection since there are almost 300 pictures showing the various colorscheme/background combos! sleepy |
i'm okay with my colorscheme, but i was just trying this out of curiosity, and i get this error message:
Code:
jeff@bart:~ $ vim .vimrc |
slackhack -
Thanks for catching that. I mistakenly put the 'set' in front of 'colorscheme' in my code above. I have since removed the 'set'...the correct option in your .vimrc should be: Code:
colorscheme murphy sleepy |
doesn't work for me
After I corrected that "set colorscheme" defect, I start vi on an html file, and I see a lot of formatting, but no color. It's underlining angle brackets and changing the weight of the font for paragraph, title etc. elements in the html, but its not showing it in color.
What gives? chewy |
Quote:
|
That worked!
I had my TERM set to linux or vt220, both of which did not work for color syntax in vim. But xterm did. Thanks for the help!
|
All times are GMT -5. The time now is 11:10 PM. |