Macos – where is ~\.vim folder in mac os? and how to install themes in gvim

idemacosvim

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!

Best Solution

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