在Mac上没有vimrc,gvimrc和.vim [英] No vimrc, gvimrc and .vim on mac

查看:291
本文介绍了在Mac上没有vimrc,gvimrc和.vim的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的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:

  1. 打开Terminal.app(在/Applications/Utilities/下找到).

在提示符下,键入$,然后在每行中键入<Enter>(不要键入$):

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.

    EDIT

    EDIT

    您没有按照说明进行操作,难怪该插件无法正常工作.

    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~/.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

    ENDEDIT

    这篇关于在Mac上没有vimrc,gvimrc和.vim的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆