0

I'm trying to load a colorscheme with Vim and the color scheme file is located in ~/.vim/colors as many suggest in various articles.

When I try to use :colo sonokai Vim informs me it cannot find it.

Running :set runtimepath? results in:

runtimepath=~/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim82,/usr/share/vim/vim,files/after,~/.vim/after,/usr/lib/python3.9/site-packages/powerline/bindings/vim

Which I don't believe includes any of the folders within .vim, only ~/.vim itself.

My current .vimrc file:

"------------Key Mappings-----------
imap jj <Esc>

"-----------Powerline Vim ---------
python3 from powerline.vim import setup as powerline_setup
python3 powerline_setup()
python3 del powerline_setup
set rtp+=/usr/lib/python3.9/site-packages/powerline/bindings/vim

"---------Powerline Vim Config-----
set laststatus=2
"Always display the statusline in all windows
set showtabline=2
"Always display the tabline, even if there is only one tab
set noshowmode
"Hide the default mode text (e.g. -- INSERT -- below the statusline)
set noshowcmd
set shortmess+=F

"-------------Syntax Enabled-------
syntax on

I'm not sure what I'm doing wrong here, any help would be appreciated.

I'm running Garuda Dr4gonized and have removed much of the cli stuff that comes along with it, such as the pre-existing vim and fish scripts, shells, etc; adding powerline, but otherwise not much else. If this information helps.

4
  • 2
    Is it actually saying a simple error message that the colorscheme is not found? or is saying that it can't find a lot of functions and variables? The colorscheme here github.com/sainnhe/sonokai also has a autoload/sonokai.vim file while is critical for the colorscheme to work. Commented Aug 18, 2021 at 2:02
  • @ChrisHeithoff Wow. ugh, TY I completely missed the sonokai.txt explaining how to install this. :facepalm: thanks again.
    – jFasaJr
    Commented Aug 18, 2021 at 2:55
  • 1
    One more thing...a colors directory itself is not part of the runtimepath, but every directory in the runtimepath may have a colors directory. Same applies for plugin, syntax, ftplugin, ftdetect, autoload, and compiler directories. Commented Aug 18, 2021 at 12:14
  • Welcome to Vi and Vim! Before posting your vimrc, it's a good idea to check out How to debug my vimrc so you can provide a minimal example that reproduces the problem.
    – D. Ben Knoble
    Commented Aug 18, 2021 at 13:21

1 Answer 1

1

As Chris Heithoff mentioned in comments, you need to make sure that the autoloader for the colorscheme is needed or not. There is generally a .txt file with install instructions or there "could be". It'll be under the 'doc' folder of that colorscheme repo.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.