where is ~\.vim folder in mac os? and how to install themes in gvim?
Solution 1
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 yourcolors
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
Solution 2
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.
Comments
-
pythoniku about 4 years
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!
-
huangli over 11 yearsEvery time I open my vim it still use the default color scheme, it's not permanently.
-
kev over 11 years@huangli You need to create a
vimrc
file, and put the command intovimrc
. -
ILikeTurtles almost 10 yearsI think a lot of people don't know that you have to create your own .vim folder.
-
Zach Saucier almost 5 yearsMake sure to also put
:syntax enable
if you haven't already.