我想为所有用户将gruvbox设置为全局默认配色方案,但是我无法正常工作。我得到E185: Cannot find color scheme*
,但是此解决方案here对我不起作用。 (我正在尝试在vim
中进行此操作,而不是在gvim
中进行此操作。)
我在/usr/share/vim/vim82/plugs/gruvbox
中安装了gruvbox。我的/etc/vimrc
是我在Windows桌面上使用的vimrc的修改,但是现在我在Linux上运行它:
" All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just
" /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime
" you can find below. If you wish to change any of those settings, you should
" do it in this file (/etc/vimrc), since archlinux.vim will be overwritten
" everytime an upgrade of the vim packages is performed. It is recommended to
" make changes after sourcing archlinux.vim since it alters the value of the
" 'compatible' option.
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages.
runtime! archlinux.vim
" If you prefer the old-style vim functionalty, add 'runtime! vimrc_example.vim'
" Or better yet, read /usr/share/vim/vim80/vimrc_example.vim or the vim manual
" and configure vim to your own liking!
" do not load defaults if ~/.vimrc is missing
"let skip_defaults_vim=1
" Make vim portable, well, not portable in linux yet
" let $HOME=$VIM
" Set color scheme
set t_Co=256
syntax on
colorscheme gruvbox
set background=dark
highlight Comment cterm=bold
" Setup Vimplugs
call plug#begin('/usr/share/vim/vim82/plugs')
Plug 'vim-python/python-syntax'
Plug 'scrooloose/nerdcommenter'
Plug 'tmhedberg/SimpylFold'
Plug 'vim/killersheep'
Plug 'gruvbox-community/gruvbox'
call plug#end()
这是我的runtimepath
:
runtimepath=~/.vim,/usr/share/vim/vim82/plugs/python-syntax,/usr/share/vim/vim82/plugs/nerdcommenter,/usr/share/vim/vim82/plugs/SimpylFold,/usr/share/vim/vim82/plugs/killersheep,/usr/share/vim/vim82/plugs/gruvbox,/usr/share/vim/vimfiles,/usr/share/vim/vim82,/usr/share/vim/vimfiles/after,~/.vim/after
vim --version
显示以下搜索路径:
system vimrc file: "/etc/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/usr/share/vim"
有什么想法吗?
答案 0 :(得分:0)
我已经解决了这样的问题:
su
)vim
gruvbox
vim
在我安装插件并始终使用前缀sudo
的用户帐户修改/ etc / vimrc之前,但似乎效率不高。重做为root
的所有事情都有帮助。