I downloaded color sample pack from http://vim.sourceforge.net/scripts/script.php?script_id=625
it says i should unzip and place it into ~/.vim but where is this folder? I tried unzip it to my usr/share/.vim folder but it is not working, I don't see themes added to gvim Edit>color scheme menu, and i tried "colorscheme sometheme", "color sometheme" in my gvimrc. Both not working for new themes
Isn't the ~/.vim should be the .vim folder in use/share? or I should create a new folder under home?
Note:there is a folder vim73 in my .vim, I guess this doesn't affect anything
thanks for any help!
The path used by macOS's default vim install is /usr/share/vim/vimrc . If you aren't using the default, here's the easiest way to discover where it is: :scriptnames . The first line should be the system vimrc .
I found the answer here: color scheme's and syntax' files can be found in /usr/share/vim/ .
Some color schemes are already installed on your system. You can find those color schemes in the /usr/share/vim/vim*/colors directory as . vim extension.
By default, Vim looks for colorschemes in the <runtimepath>/colors/ directory.
First of all, open vim
, and get help from :help colorscheme
:colo[rscheme] {name} Load color scheme {name}. This searches 'runtimepath' for the file "colors/{name}.vim. The first one that is found is loaded.
After reading the manual above. Take the following steps maybe help you:
find runtimepath
:set runtimepath?
It will print out run-time paths:runtimepath=~/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim71,/usr/share/vim/vimfiles/after,~/.vim/after
create directory called colors
under one of them if not exist(for example: ~/.vim
)
$ ls ~/.vim ls: cannot access /root/.vim: No such file or directory <== we need create it!!! $ mkdir -p ~/.vim/colors
copy your color.vim
to your colors
directory
$ cp /path/to/your/color.vim ~/.vim/colors
restart vim
to use new colorscheme
:colorscheme color
(optional) put command above to ~/.vimrc
file to make it permanent
In UNIX parlance, ~
represents your home folder which is /Users/<username>
in Mac OS X.
You are supposed to put all your custom scripts/colorschemes/whatever in a .vim
folder situated in your home folder. In Terminal.app, type each line (without the $
) then hit Enter:
$ cd
to be sure you are in your home folder
$ mkdir .vim
here you'll have an error message if ~/.vim
already exists; if you don't receive a message it means that the folder is created
$ cd .vim
to move into it
$ open .
to open a Finder window here. At this point you should follow specific indications.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With