4

I was trying to install gruvbox colorscheme through Vundle but when I run vim. There was an error like this:

Error detected while processing C:\Users\user\.vimrc:

line   53:

E185: Cannot find color scheme 'gruvbox'

I've searched everywhere in Stack Overflow and tried everything but none of them worked. Can you please help me figure this out?

Here are commands which I ran:

vim
:PluginInstall
:q 
vim <-- This is where I got the error

my .vimrc:

set nocompatible          
filetype off                  

set rtp+=$HOME/.vim/bundle/Vundle.vim/
call vundle#begin('$HOME/.vim/bundle/')

Plugin 'VundleVim/Vundle.vim'

Plugin 'tpope/vim-fugitive'
Plugin 'file:///home/gmarik/path/to/plugin'
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}

Plugin 'morhetz/gruvbox'


call vundle#end()           
filetype plugin indent on   

syntax enable
set background=dark
colorscheme gruvbox
set tabstop=4 
set softtabstop=4 
set expandtab 
set number
set showcmd
set cursorline
filetype indent on 
set wildmenu 
set lazyredraw 
set showmatch
set incsearch 
set hlsearch 
nnoremap <leader><space> :nohlsearch<CR>
RootOnChair
  • 137
  • 10
  • I don't understand about Vundle, but you should check if the files are really there. After a quick skim over the documentation, try `:PluginList` to see if it appears loaded. – sidyll Oct 05 '18 at 18:14
  • yes, it's there. I've also checked in my .vim file and it's also there. However, I think that for some reason vim can't get to the 'gruvbox\color' directory to get the colorscheme. – RootOnChair Oct 06 '18 at 00:20
  • I've also check my .vim folder. Sorry, I mistyped it. – RootOnChair Oct 06 '18 at 03:14
  • Did u manage to fix the problem? I got the same problem – DarkSuniuM Nov 10 '18 at 01:01
  • No, I haven't. I have tried so many ways. – RootOnChair Nov 10 '18 at 03:35
  • Is vim calling a different .vimrc (maybe with a wrong gruvbox configuration)? The reason for the question is that the .vimrc included in the question only goes to line 34 and doesn't have the error line 53. – DC Slagel May 28 '19 at 13:11

1 Answers1

2

You need to change line 11 of your .vimrc to

Bundle 'rstacruz/sparkup', {'rtp': 'vim'} 

As explained on https://github.com/VundleVim/Vundle.vim/wiki/Vundle-for-Windows#trailing-slash-issue the trailing slash in your vimrc leads to an invalid runtimepath which causes all plugin loading to fail

Nick Edwards
  • 630
  • 8
  • 18