如何设置默认的vim颜色方案 [英] How to set default vim colorscheme
问题描述
Ubuntu 的最新升级使我的 vim 颜色方案无法使用.我知道如何手动设置它(例如,:colo night
),但我想为所有 vim 会话设置默认值.我在其他地方看到了对 .vimrc
的引用,但到目前为止我还没有找到正确的位置和语法.
The latest upgrade of Ubuntu made my vim colorscheme unusable. I know how to set it manually (:colo evening
, for example), but I want to set the default for all vim sessions. I see reference in other places to .vimrc
, but the right location and syntax have eluded me thus far.
推荐答案
您的 .vimrc
文件位于您的 $HOME
目录中.在 *nix 中,cd ~;vim .vimrc
..vimrc
中的命令与您在 vim 中输入 ex-mode 中的命令相同,只是没有前导冒号,所以 colo night
就足够了..vimrc
中的注释用前导双引号表示.
Your .vimrc
file goes in your $HOME
directory. In *nix, cd ~; vim .vimrc
. The commands in the .vimrc
are the same as you type in ex-mode in vim, only without the leading colon, so colo evening
would suffice. Comments in the .vimrc
are indicated with a leading double-quote.
要查看示例 vimrc,请从 vim 中打开 $VIMRUNTIME/vimrc_example.vim
To see an example vimrc, open $VIMRUNTIME/vimrc_example.vim
from within vim
:e $VIMRUNTIME/vimrc_example.vim
这篇关于如何设置默认的vim颜色方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!