命令行 VIM 不改变背景(保持黑色)?

发布于 2025-01-03 04:40:16 字数 146 浏览 5 评论 0原文

我在 gVIM 和 VIM 中都尝试过这个 背景在 gVIM 中正确应用,但在 VIM 中则不然,它只是保持黑色。 我使用命令 :color zenburn 我在 Windows XP 中运行这个命令提示符 我还想知道xp中的命令提示符支持多少种颜色。

I have tried this in both gVIM and VIM
the background is correctly applied in gVIM but not in VIM, it just stays black.
I use the command, :color zenburn
I am running this in Windows XP, Command Prompt
I also wonder how many colours command prompt in xp supports.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

小…红帽 2025-01-10 04:40:16

“gui”vim (gvim) 和“console”vim (vim) 之间的颜色设置完全不同。对于相同的配色方案,它们甚至可以完全不同。

我不熟悉“zenburn”方案,但听起来它会根据您是否使用 GUI 做出不同的选择。

:highlight 命令有不同的参数 (< code>term=、cterm=gui= 等)定义了 vim 在不同模式下使用的不同颜色。您应该能够查看 zenburn.vim 颜色定义文件以了解它正在使用什么。

The colour sets between "gui" vim (gvim) and "console" vim (vim) are completely different. They can even be completely different for the same colour scheme.

I'm unfamiliar with the "zenburn" scheme, but it sounds like it makes different choices depending on whether you're using the GUI or not.

The :highlight command has different arguments (term=, cterm=, gui=, etc) that define the different colours used by vim in different modes. You should be able to look at your zenburn.vim colour definition file to see what it is using.

闻呓 2025-01-10 04:40:16

GUI 版本和 Vim 控制台版本的颜色在每个 colorcheme 文件中设置不同。它们甚至根本不需要设置(某些颜色方案仅定义 GUI 版本的值,反之亦然)。

话虽这么说,打开你的 colorcheme 文件 (zenburn.vim) 并查找它。如果您对背景颜色感兴趣,请检查它是否有一条看起来相似

hi Normal guibg=... guifg=.... ctermbg=.... ctermfg=...

或相似的线条。

这些值应该在那里 - 如果您愿意,可以根据您的喜好更改它们。

The colors for the GUI version and the console version of Vim are set differently in each colorscheme file. They don't even have to be set at all (some colorschemes define only the values for the GUI version and vice versa).

That being said, open up your colorscheme file (zenburn.vim) and look it up. If you're interested in the background color, check it up for a line looking similar to

hi Normal guibg=... guifg=.... ctermbg=.... ctermfg=...

or something similar.

The values should be there - change them to your liking if you wish.

待"谢繁草 2025-01-10 04:40:16

在 Windows 命令提示符中,我发现只有 16 种颜色的配色方案效果很好。您可能更喜欢安装 cygwin 并在安装中包含 mintty。 mintty 是一个更好的终端,我对 256 色没有任何问题。 http://code.google.com/p/mintty/

In a windows command prompt, I find only 16 color color schemes work well. You may prefer to install cygwin and include mintty in the installation. mintty is a better terminal and I have no problem with 256 colors. http://code.google.com/p/mintty/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文