我想向vimrc添加背景色,但是不起作用


11

每次工作时,我都必须在vim编辑器中运行此程序。

highlight Normal ctermfg=grey ctermbg=black

我想要的是自动化的,我已经将背景设置为黑暗,但是vimrc中什么也没有发生。我该怎么办?Vimrc内容(前几行)

syntax on
set background=dark
set ruler                     " show the line number on the bar
set more                      " use more prompt
set autoread                  " watch for file changes
set number                    " line numbers

谢谢。

Answers:


16

在.vimrc中,替换

set background=dark

highlight Normal ctermfg=grey ctermbg=black

1

如果您永久性地进行了在Vim中所做的更改,则必须在.vimrc中编写代码,然后打开.vimrc文件,然后放置此行

set background=dark

然后保存并关闭。然后打开Vim,您将看到更改。


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.