开发者

Syntax highlighting in vim

开发者 https://www.devze.com 2022-12-23 00:51 出处:网络
I\'m having tro开发者_开发知识库uble reading dark blue on black when I turn on syntax colours in vim.

I'm having tro开发者_开发知识库uble reading dark blue on black when I turn on syntax colours in vim.

How do I change some of the default colours or the colours of schemas like:

http://www.vim.org/scripts/script.php?script_id=1571


First, try :set background=dark, which will cause vim to change to a color scheme that works better for reading on a black background.

If that doesn't work well enough, you can create your own color scheme by following these directions: http://vim.wikia.com/wiki/Create_a_color_scheme_based_on_another


You can switch the colorscheme with:

:colo <colorscheme-name>

Tab circles over all available colorschemes:

:colo <Tab>

If you need more schemes get some from http://vimcolorschemetest.googlecode.com/svn/html/index-c.html


As stefanB says, you can change colorschemes with the :colo[rscheme] command. There are a dozen or so built in schemes, and you can download thousands more from the Vim website.

I recommend installing the Color Sampler Pack - this is a selection of the 100 most popular colorschemes, and in Gvim it adds a menu that will let you switch between them easily.


Favorite colorschemes (set with :colo[rscheme] as mentioned a few times)

" Dark Background
"colo desert256
"colo xoria256 "colo vylight
"colo slate

" Light Background
"colo summerfruit256
"colo beauty256 "colo phpx
"colo morning

The *256 ones work well when working through putty.

My understanding of the background settings is that it tweaks the colors of your colorscheme so they are more visible on a dark or light background. Although the schemes i use seem to handle this themselves well. See:

:h 'background'


That dark blue color is hard to see for sure. I don't know what environment you're working in, but I normally tweak the color settings in my console or putty so that it shows up better. This will protect you from other programs that want to use that color too.


I'm not sure if this answers your question, but there are several ways to get different color schemes. My favorite (and the only one I'm really familiar with) is

:set bg=dark

This makes most code easier to read.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号