Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is vim and vim help files located on OS X? — They're not listed in my home folder

I'm looking to install vim-latex for mac, and in doing so, I've noticed that certain files need to be placed in ~/.vim, which does not exist on my computer.

Do I have to create that folder?

If vim and all the vim help files aren't there, where are they?

like image 396
iDontKnowBetter Avatar asked Dec 17 '22 10:12

iDontKnowBetter


2 Answers

Inside Vim, :echo $VIMRUNTIME will show you where the Vim stuff is. The help files are in $VIMRUNTIME/Doc. Excerpt from :he VIMRUNTIME:

The environment variable "$VIMRUNTIME" is used to locate various support files, such as the on-line documentation and files used for syntax highlighting. For example, the main help file is normally "$VIMRUNTIME/doc/help.txt".

If you install new packages, don't put them into $VIMRUNTIME. Create the ~/.vim folder and place the plugins there. That way you keep the installation directory clear from your modifications and keep the plugins independent of Vim updates. If you update Vim and $VIMRUNTIME changes during installation, you would have to copy everything of your custom stuff from the old $VIMRUNTIME to the new one.

So, as I already wrote, create the ~/.vim folder and you're off the hook.

like image 198
eckes Avatar answered Jan 21 '23 13:01

eckes


Yes, you will need to create .vim directory. Your home directory (~) and subdirectories are working directories that are personal to you on OS X. Other users don't have access. Applications are usually installed to shared area in the filesystem, in Linux applications are often installed to /usr/local/ or /usr/local/share, sometimes in /opt. Not sure where they're installed in OS X.

Any plugins you install for yourself should be installed to a /plugin directory within your ~/.vim directory. This customizes Vim for your login only; other logins won't have your .vim and subdirectories so they won't be customized when Vim starts up. (You could install plugins to the shared area where Vim app is installed if you wanted them to run for all user logins.) More complex plugins may have files in several different folders within .vim: /.vim/plugin; /.vim/syntax; /.vim/indent; /.vim/ftplugin; /.vim/colors, . . .

like image 35
Herbert Sitz Avatar answered Jan 21 '23 15:01

Herbert Sitz