8

So I have downloaded proton.vim (a colorscheme) and placed it inside my .vim/colors folder.

In .vimrc, right at the bottom I have

colorscheme proton

but when Vim loads, it is set to the default colorscheme. If I type

:colorscheme proton

after it has loaded, it works fine though. Anyone know what else I need to do to persist this colorscheme?

2
  • 2
    I don't know if it will help you, but if proton is a colorscheme for the gui version of Vim, you could try creating a .gvimrc file, and write the line colorscheme proton at the end of it.
    – saginaw
    Mar 13, 2016 at 11:29
  • 3
    Or perhaps there already is a gvimrc file that overrides this (this file is only loaded when using Gvim). Otherwise you can try following the steps here and/or posting your full vimrc file Mar 13, 2016 at 12:04

3 Answers 3

5

Try this to help troubleshoot the issue:

  1. Check the location where you have downloaded the color proton.vim file.

    On Linux, the system default will be something like /usr/share/vim/vim74/colors/

    On MSWindows, the system default will be something like C:\Program Files (x86)\Vim\vim74\colors\

    You could also try setting up a home directory for colors: $HOME/.vim/colors on Linux, or $HOME/vimfiles/colors on MSWindows.

  2. See if the color scheme shows up outside of your ~/.vimrc

    Restart vim, then per this StackOverflow post, type

    :colorscheme then Space followed by CTRLd

    This should list your colorscheme along with all other color schemes.

Note: CTRLd returns one list which shows all color schemes.

If you use :colorscheme then Space followed by TAB you will iterate over the list of color schemes, one at a time, each time you press TAB

You can also see this behaviour if you use :colorscheme then Space followed by CTRLi ; you will iterate over the list of color schemes, one at a time, each time you press CTRLi

When I troubleshoot an issue like this, I prefer CTRLd so I may see the entire list at once.

  1. type

    :let colors_name

    to return the name of the current colorscheme in use by vim

  2. If you've added it to ~/.vimrc

    to confirm which .vimrc file is being loaded by vim, type

    :scriptnames

    This will show you the path to the .vimrc, the path to the current colorscheme loaded, and all scripts sourced so far.

    This file will be ~\_vimrc on MSWindows.

2
  • You've used control-d (to get the list of colorschemes) where I've always used tab. Is there a difference? (:h for control-d just witters on pointlessly about scrolling downwards).
    – user859
    May 9, 2016 at 8:21
  • There's a difference. :-) I have expanded the answer. May 9, 2016 at 20:03
1

Check whether the color scheme's name is mentioned properly, for case sensitivity. Also, check whether

let colors_name = "name"

is found or not. If not, add this line and try again.

1
  • Thanks, this helped for me. It somehow worked inside screen without this though.
    – wastl
    Mar 12, 2020 at 13:35
0

I had this problem when the colorscheme name (as in let g:colors_name = "selenized" inside colorscheme file) contained uppercase letters. Changing it to lowercase fixed the problem.

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.