Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
795 views
in Technique[技术] by (71.8m points)

macos - No vimrc, gvimrc and .vim on mac

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You must create those files and folder yourself:

  1. Open Terminal.app (found under /Applications/Utilities/).

  2. At the prompt, a $, type each of these lines followed by <Enter> (don't type the $):

    $ touch .vimrc
    $ touch .gvimrc
    $ mkdir .vim
    $ open .vim
    
  3. At this point, the ~/.vim folder is open in a new Finder.app window.

But I'd respectfully suggest you to get accustomed to the command-line and Vim's basics before rushing to install plugins.

EDIT

You didn't follow the instructions, no wonder the plugin doesn't work.

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.

Now that you have ~/.vim/c, here is what you should do to go forward.

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

When you are done, delete ~/.vim/c and start Vim. The plugin should be installed and working.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...