vim 和 vim 帮助文件在 OS X 上位于哪里? —它们没有列在我的主文件夹中
我正在寻找安装 vim-latex for mac,在这样做时,我注意到某些文件需要放置在 ~/.vim
中,而我的计算机上不存在该文件。
我必须创建该文件夹吗?
如果 vim 和所有 vim 帮助文件都不存在,那么它们在哪里?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 Vim 中,
:echo $VIMRUNTIME
会告诉你 Vim 的东西在哪里。帮助文件位于$VIMRUNTIME/Doc
中。摘自:he VIMRUNTIME
:如果您安装新软件包,不要将它们放入
$VIMRUNTIME
中。创建~/.vim
文件夹并将插件放在那里。这样您就可以保持安装目录不受修改影响,并使插件独立于 Vim 更新。如果您更新 Vim 并在安装过程中发生$VIMRUNTIME
更改,则必须将所有自定义内容从旧的$VIMRUNTIME
复制到新的。因此,正如我已经写过的,创建
~/.vim
文件夹就可以摆脱困境了。Inside Vim,
:echo $VIMRUNTIME
will show you where the Vim stuff is. The help files are in$VIMRUNTIME/Doc
. Excerpt from:he VIMRUNTIME
: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.是的,您需要创建 .vim 目录。您的主目录 (
~
) 和子目录是您在 OS X 上的个人工作目录。其他用户无权访问。应用程序通常安装到文件系统中的共享区域,在 Linux 中应用程序通常安装到 /usr/local/ 或 /usr/local/share,有时安装在 /opt 中。不确定它们在 OS X 中的安装位置。您自己安装的任何插件都应该安装到
~/.vim
目录中的 /plugin 目录中。这只会为您的登录自定义 Vim;其他登录不会有您的 .vim 和子目录,因此当 Vim 启动时它们不会被自定义。 (如果您希望插件在所有用户登录时运行,您可以将插件安装到安装 Vim 应用程序的共享区域。)更复杂的插件可能在 .vim 内的几个不同文件夹中包含文件: /.vim/plugin; /.vim/语法; /.vim/缩进; /.vim/ftplugin; /.vim/颜色, . 。 。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, . . .