I just migrated today from VSCode to Vim, and I need a little bit of help regarding the installation of Vim Plug. I installed Vim with Homebrew, and now I want to install Vim Airline. The tutorial I am following uses Vim Plug for this. This is the code block to install Vim Plug, according to the tutorial:

    $ curl -fLo ~/.vim/autoload/plug.vim --create-dirs \

When I insert it to the Terminal, it gives the following error:

    Error creating directory /Users/api/.vim/autoload.

I browsed the documentation, but I did not find a solution. I am using Big Sur 11.6, if it helps.

  • 1
    Welcome to Vi and Vim! Do you already have a ~/.vim and ~/.vim/autoload directory? The command doesn't create directories for you; try it with the --create-directories option to curl.
    – D. Ben Knoble
    Oct 26 at 15:08
  • 1
    If you have (some of) the directories, make sure the permissions are correct. For example, you can use ls -ld ~/.vim and check whether it's owned by your user or by root. (If you use a sudo command to initially created, it might end up being owned by root, in which case you won't be able to create subdirectories...)
    – filbranden
    Oct 26 at 23:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.