Results 1 to 7 of 7

Thread: Configuring VIM properly, cant get colorscheme to work

  1. #1
    Join Date
    Mar 2013
    Beans
    4

    Configuring VIM properly, cant get colorscheme to work

    Hello, I have been trying to configure my vimrc file to my liking and for some reason I can't get colorscheme to work. It always says it can't find the colorscheme file. From what I can tell most my other settings work, just not colorscheme.

    I did my research and people were saying you have to create your .vim file in ~/.vim and I also made a dir colors in ~/.vim/colors and put my colorscheme in there, but it still doesn't work. I have also found vimrc files in both /etc/vim and /usr/share/vim, so I am unsure of where I am actually supposed to be making my changes.

    I am new to linux and vim, so if you would be so kindly to explain theses shenanigans to the laymen?

    Thanks for any replies. I have been trying to figure this out for two days, and I hope the answer isn't too painfully obvious.

  2. #2
    Join Date
    Aug 2010
    Location
    Lancs, United Kingdom
    Beans
    1,588
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Configuring VIM properly, cant get colorscheme to work

    The default color location is /usr/share/vim/vim*/colors/. Additional personal colors can be placed in ~/.vim/colors/.

    Are you using vim in a terminal or a gui version (e.g. gvim)? colorscheme is different in a gui from in a terminal, at least with respect to background color (I'm not sure what else). If you start vim and type :colorscheme<space><tab> then you can keep tabbing through the available schemes. Of course, in gvim you can select it from the menu.

  3. #3
    Join Date
    Apr 2011
    Location
    Maryland
    Beans
    1,461
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: Configuring VIM properly, cant get colorscheme to work

    Also to add to that, be sure that you're typing the color name exactly as it appears - case is important. For example, I use the colorscheme 'molokai' in my .vimrc. So, the line should read:

    Code:
    color molokai
    Be careful not to enter 'Molokai' or 'MOLOKAI'.

  4. #4
    Join Date
    Mar 2013
    Beans
    4

    Re: Configuring VIM properly, cant get colorscheme to work

    Quote Originally Posted by spjackson View Post
    The default color location is /usr/share/vim/vim*/colors/. Additional personal colors can be placed in ~/.vim/colors/.

    Are you using vim in a terminal or a gui version (e.g. gvim)? colorscheme is different in a gui from in a terminal, at least with respect to background color (I'm not sure what else). If you start vim and type :colorscheme<space><tab> then you can keep tabbing through the available schemes. Of course, in gvim you can select it from the menu.
    Thanks a lot, that cleared up my confusion nicely. Now I notice that my /etc/vim/vimrc and /usr/share/vim/vimrc files are synced and not my ~/.vim/vimrc. How can I get it so that if I make changes to the ~/.vim/vimrc file it will make the changes everywhere else? I can put colors in the ~/.vim/colors like you said, just the vimrc file doesn't do anything.

  5. #5
    Join Date
    Mar 2013
    Beans
    4

    Re: Configuring VIM properly, cant get colorscheme to work

    Quote Originally Posted by drmrgd View Post
    Also to add to that, be sure that you're typing the color name exactly as it appears - case is important. For example, I use the colorscheme 'molokai' in my .vimrc. So, the line should read:

    Code:
    color molokai
    Be careful not to enter 'Molokai' or 'MOLOKAI'.
    Yea, I just noticed that. I was typing it as colorscheme.vim and it wouldn't recognize it with the file extension.

  6. #6
    Join Date
    Aug 2010
    Location
    Lancs, United Kingdom
    Beans
    1,588
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Configuring VIM properly, cant get colorscheme to work

    Quote Originally Posted by devync View Post
    Thanks a lot, that cleared up my confusion nicely. Now I notice that my /etc/vim/vimrc and /usr/share/vim/vimrc files are synced and not my ~/.vim/vimrc. How can I get it so that if I make changes to the ~/.vim/vimrc file it will make the changes everywhere else? I can put colors in the ~/.vim/colors like you said, just the vimrc file doesn't do anything.
    /usr/share/vim/vimrc is a symbolic link to /etc/vim/vimrc. They are not exactly synced but rather the same file.
    Your personal configuration file is not ~/.vim/vimrc but ~/.vimrc . Changes to ~/.vimrc are read when vim starts, but are not reflected "everywhere else" - I am unclear what you are trying to achieve by that.

  7. #7
    Join Date
    Mar 2013
    Beans
    4

    Re: Configuring VIM properly, cant get colorscheme to work

    Quote Originally Posted by spjackson View Post
    /usr/share/vim/vimrc is a symbolic link to /etc/vim/vimrc. They are not exactly synced but rather the same file.
    Your personal configuration file is not ~/.vim/vimrc but ~/.vimrc . Changes to ~/.vimrc are read when vim starts, but are not reflected "everywhere else" - I am unclear what you are trying to achieve by that.
    Thanks, I am just trying to achieve a file that is easier to access that having to go to /etc/vim/vimrc and I can just go to ~/.vimrc

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •