How to set default vim colorscheme

前端 未结 10 1102
南笙
南笙 2020-12-22 20:33

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

相关标签:
10条回答
  • 2020-12-22 21:26

    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.

    To see an example vimrc, open $VIMRUNTIME/vimrc_example.vim from within vim

    :e $VIMRUNTIME/vimrc_example.vim
    
    0 讨论(0)
  • 2020-12-22 21:32

    It's as simple as adding a line to your ~/.vimrc:

    colorscheme color_scheme_name

    0 讨论(0)
  • 2020-12-22 21:32

    Ubuntu 17.10 default doesn't have the ~/.vimrc file, we need create it and put the setting colorscheme color_scheme_name in it.

    By the way, colorscheme desert is good scheme to choose.

    0 讨论(0)
  • 2020-12-22 21:33

    Put a colorscheme directive in your .vimrc file, for example:

    colorscheme morning
    

    See here: http://vim.wikia.com/wiki/Change_the_color_scheme

    0 讨论(0)
提交回复
热议问题