Aron Lee
Aron Lee

Reputation: 617

How to change vim colorscheme to point to different directory

I'm wondering whether I can change 'colorscheme' to point to different directory.(rather than default) since I want to set my all my color schemes in vimrc file with my own directory.

In My MacOS, the default directory are in /usr/local/share/vim/vim80/colors

Upvotes: 0

Views: 2080

Answers (2)

Ingo Karkat
Ingo Karkat

Reputation: 172540

As @romainl pointed out, keep your hands off the system-wide directories. Just because Vim's default stuff gets installed under /usr/local/share/vim, this doesn't mean that your personal extensions and customizations should be in there as well. You'll provoke problems when upgrading or reinstalling Vim.

If the suggested default location (~/.vim/colors/) doesn't suit you, you can add additional directories to 'runtimepath' (early enough; i.e. in your ~/.vimrc). For colorschemes, the direct directory has to be colors, though. To work around that, you'd have to use filesystem links to create an alias.

Upvotes: 1

romainl
romainl

Reputation: 196516

You are supposed to put colorschemes in ~/.vim/colors/.

Create that directory if it doesn't exist and stay away from /usr/local/share/vim/.

Upvotes: 2

Related Questions