[英]I don't see colors when open a C file in vim
I dont see colors when open a C file in vim, check my terminal type using the folllowing command 在vim中打开C文件时我看不到颜色,使用以下命令检查我的终端类型
> echo $TERM
vt100
Is it because vt100 doesn't supports colors. 是因为vt100不支持颜色。 How can I change the same? 我怎么能改变呢?
I'd suggest 我建议
:syntax on
Note [1] 注[1]
But it could be your version of Vim was 但它可能是你的Vim版本
Note [1] In fact 注[1]实际上
filetype plugin on
filetype indent on
syntax on
are good to have in your .vimrc 你的.vimrc很好
type: 类型:
:syntax on
then 然后
:colorscheme
and then press TAB
and select what you want. :colorscheme
然后按TAB
并选择你想要的。
:set t_Co?
tells you what Vim thinks about the available colors. 告诉你Vim对可用颜色的看法。 If this is empty or 2
, you obviously should try to fix the terminal type $TERM
, either by using another terminal that gets detected properly, or by updating the variable's content (most terminals will work with a value of xterm
, which gets you 16 colors). 如果这是空的或2
,你显然应该尝试修复终端类型$TERM
,或者通过使用另一个被正确检测到的终端,或者通过更新变量的内容(大多数终端将使用xterm
的值,这将使你获得16颜色)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.