且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

vim colorscheme显示不正确的颜色

更新时间:2022-10-20 12:40:55

p>当colorscheme只定义GVIM的颜色时,GUI版本的Vim,你可以,如果你有一个高色终端支持88或256色,使用 CSApprox插件转换(一次或在Vim启动期间自动)终端的颜色定义。


I just grabbed the "Ultimate Vim Distribution" (http://vim.spf13.com/) that came with a bunch of colorschemes.

For some reason, setting a colorscheme inside my .vimrc (e.g. "colorscheme corporation") results in completely different colors than the colorscheme actually defines. Moreover, manually entering :colorscheme corporation once vim has loaded a file results in the colors changing to the correct scheme.

Upon loading a file, ":colo" and "echo g:colors_name" both print "corporation", as they should. "t_Co" is set to 256 before the colorscheme is set (if that matters). I'm all out of ideas!!

Thank you!

When the colorscheme only defines colors for GVIM, the GUI version of Vim, you can, if you have a high-color terminal that supports 88 or 256 colors, use the CSApprox plugin to convert (once or automatically during Vim startup) the color definitions for the terminal.