4

Currently, I use vim-plug for managing plugins and vim-colorschemes for my colorschemes - which doesn't work.

Approach 1:

in my init.vim:

Plug 'flazz/vim-colorschemes'
[...]
syntax on
colorscheme babymate256
set background=dark

Putting those colorscheme settings at the end of my init.vim(=after my mappings), works. Putting those before my mappings (but after filetype plugin and that) doesn't. That doesn't make much sense to me, but as neovim supports asynchron execution, that may be the cause.

Putting set runtimepath+=~/.dotfiles/nvim/plugged/vim-colorschemes/colors before those colorscheme settings doesn't work either.

Approach 2:

Putting all colorschemes from nvim/plugged/vim-colorschemes/colors into nvim/colors/ doesn't change anything.

Of course, i can set my colorscheme manually after nvim has started.

  • I thought of using just an if structure for setting the colorscheme, but i don't know what i could test, as the colorscheme set doesn't provide any variables.
  • why does the manual configuration using nvim/color doesn't work?
  • Do you have suggestions on how to manage colorschemes?

EDIT: I don't like setting it at the end of my file, as it destroys my file structure.

3
  • Your default colorscheme seems to be babymate256. When you say it doesn't work, which colorscheme is loaded instead ? Could you provide the content of a log file vim --startuptime log to see which file sets up the colorscheme ? You can access the name of your current colorscheme through the global variable g:colors_name and load the colorscheme manually with the following command : execute "colorscheme " . g:colors_name
    – saginaw
    Nov 21, 2015 at 14:25
  • log Instead of babymate256, it has loaded the default one. Did you mean that?
    – toogley
    Nov 21, 2015 at 14:39
  • 1
    @toogley Maybe I missed it, but I can't find the name of your default colorscheme in your log (it should be in a colors folder and the only one I see is babymate256). What's the name of your default colorscheme when you type :colo ? Another thing you could do to start investigating : type :hi, it will display all the highlight groups currently set. Find the name of one whose colors are not the ones you want (let's say for example StatusLine). Then type :verb hi StatusLine to discover which file last set the status line highlight group.
    – saginaw
    Nov 21, 2015 at 15:13

2 Answers 2

6

Although, i haven't found out what exactly was the problem or how i could solve it in the expected way (just placing colorscheme babymate256 in my config as everyone else does)

=> i now use just autocmd VimEnter * colorscheme babymate256 (which is not as fine as without an autocmd, but it doesn't disorganize up my config structure.)

Btw: Additionally, i just haven't found the exact name of my default colorscheme, ":colorscheme " had just printed "default"


EDIT Afterwards, i solved a very similar problem by putting "set background=dark" before the colorscheme setting.

1
  • The autocmd is the only way I got it to work. But I don't understand the root issue.
    – Yathi
    Jun 24, 2019 at 21:15
0

I had the same issue but got it to work by putting the "colorscheme yourtheme" line after I've called the plugins.

Your Answer

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

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