3

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.

  • 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 '15 at 14:25
  • log Instead of babymate256, it has loaded the default one. Did you mean that? – toogley Nov 21 '15 at 14:39
  • Using a normal directory structure and normal file names would certainly help you. – romainl Nov 21 '15 at 14:42
  • @romainl what do you mean by "normal directory structure" and "normal file names"? – toogley Nov 21 '15 at 14:44
  • 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 '15 at 15:13
5

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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