简体   繁体   中英

.vimrc file does not apply after restarting

I am new to vim, and I want to set the default color theme to obsidian2 (I have already put it into /colors).

In the normal mode, I enter :e $MYVIMRC to open the .vimrc file.

Then I add :colorscheme obsidian2 into the .vimrc file.

After restarting vim, the default color theme does not change.

Any suggestions please?

Edit: I am using MacVim. I also tried setting the $MYGVIMRC , but it doesn't help.

If you add :colorscheme obsidian2 , you just change the scheme temporarily. If you want to change scheme permanently, add config like this in your vimrc file:

set background=dark
colorscheme obsidian2

then reload vimrc.

If you instert :colorscheme obsidian2 to .vimrc file, it's wrong.

You should remove : character like: colorscheme obsidian2 and restart vim or run :source %

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM