【发布时间】:2018-06-03 03:31:30
【问题描述】:
我目前使用 Iterm2 和带有 Minimalist Vim 插件管理器的 Vim 7.4。通过 Vim 打开文件时,出现错误:
Error detected while processing MYDIRECTORY/.vimrc:
line 19:
E185: Cannot find color scheme 'onedark'
Press ENTER or type command to continue
onedark 主题无法加载,但如果在 Vim 中输入 :colorscheme onedark,它会完美加载。
我的.vimrc如下:
set t_Co=256
set autoindent
set mouse=a
set number
set shiftwidth=0
set tabstop=4
"let g:airline_theme='onedark'
"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux."
if (has("nvim"))
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
endif
if (has("termguicolors"))
set termguicolors
endif
set background=dark
colorscheme onedark
syntax on
call plug#begin('~/.vim/plugged')
"Make sure you use single quotes
"ATOM Text Editor Default Syntax Theme"
Plug 'https://github.com/joshdick/onedark.vim.git'
"Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'
"Any valid git URL is allowed
Plug 'https://github.com/junegunn/vim-github-dashboard.git'
"Multiple Plug commands can be written in a single line using |
"separators
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
"On-demand loading
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
"Using a non-master branch
Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
"Using a tagged release; wildcard allowed (requires git 1.9.2 or
"above)
Plug 'fatih/vim-go', { 'tag': '*' }
"Plugin options
Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
"Plugin outside /.vim/plugged with post-update hook
Plug 'junegunn/fzf', { 'dir': '/.fzf', 'do': './install --all' }
Plug 'https://github.com/exvim/ex-autocomplpop'
"Initialize plugin system
call plug#end()
我该怎么办?
【问题讨论】:
-
使用格式化工具使您的帖子更具可读性。代码块应类似于
code block。如果需要,请使用 bold italics,并且应该将图像添加为图像,而不是链接。
标签: vim plugins vim-plugin color-scheme iterm2