mac 上没有 vimrc、gvimrc 和 .vim [英] No vimrc, gvimrc and .vim on mac
问题描述
我的 Mac 上没有 .vimrc
、.gvimrc
文件和 .vim/
目录,所以我无法安装任何脚本.当我创建一个文件夹 .vim/
和 .vim/plugin
并在其中粘贴任何脚本时,它不起作用.对不起我的英语.
There are no .vimrc
, .gvimrc
files and .vim/
directory on my mac, and so I can't install any script. And when I create a folder .vim/
and .vim/plugin
and paste any script in there, it doesn't work.
Sorry for my english.
推荐答案
您必须自己创建这些文件和文件夹:
You must create those files and folder yourself:
打开 Terminal.app(位于
/Applications/Utilities/
下).
在提示符下,输入 $
,输入每一行,然后输入
(不要输入 $
代码>):
At the prompt, a $
, type each of these lines followed by <Enter>
(don't type the $
):
$ touch .vimrc
$ touch .gvimrc
$ mkdir .vim
$ open .vim
此时,~/.vim
文件夹在新的 Finder.app 窗口中打开.
At this point, the ~/.vim
folder is open in a new Finder.app window.
但我恭敬地建议您在急于安装插件之前先习惯命令行和Vim的基础.
But I'd respectfully suggest you to get accustomed to the command-line and Vim's basics before rushing to install plugins.
编辑
你没有按照说明操作,难怪插件不起作用.
You didn't follow the instructions, no wonder the plugin doesn't work.
您必须将 cvim.zip
移动到 ~/.vim
并在终端中运行命令 $ unzip cvim.zip
.更仔细地阅读说明,不要让 Safari 自动扩展档案.
You have to move cvim.zip
into ~/.vim
and run the command $ unzip cvim.zip
in the terminal. Read the instructions more carefully and don't let Safari expand archives automatically.
现在你已经有了 ~/.vim/c
,下面是你应该做的事情.
Now that you have ~/.vim/c
, here is what you should do to go forward.
假设你的 ~/.vim
是空的(在你的 ~/.vim/c
旁边),移动 的全部内容
>~/.vim/c 到 ~/.vim
.执行此操作后,您的 ~/.vim
文件夹应如下所示:
Supposing your ~/.vim
is empty (beside your ~/.vim/c
), move the whole content of ~/.vim/c
into ~/.vim
. After this operation, your ~/.vim
folder should look like that:
+ ~/.vim
+ c <-- your folder
+ c-support
+ (many folders and files)
+ doc
+ csupport.txt
+ ftplugin
+ c.vim
+ make.vim
+ plugin
+ c.vim
+ README.csupport
完成后,删除 ~/.vim/c
并启动 Vim.该插件应该已安装并正常工作.
When you are done, delete ~/.vim/c
and start Vim. The plugin should be installed and working.
如果你的 ~/.vim
文件夹不是空的(假设它已经有一堆文件夹和文件,比如 ~/.vim/color
、~/.vim/syntax
等等……)你必须手动移动 ~/.vim/c中的每个子文件夹/文件code> 到
~/.vim
中的正确位置.
If your ~/.vim
folder is not empty (say it already has a bunch of folders and files like ~/.vim/color
, ~/.vim/syntax
, whatever…) you'll have to move manually each subfolder/file from ~/.vim/c
to the right place in ~/.vim
.
ENDEDIT
这篇关于mac 上没有 vimrc、gvimrc 和 .vim的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!