Following the instructions on the Vundle GitHub page, entering

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

in terminal on MacOS gives

fatal: could not create leading directories of '/Users/carlo/.vim/bundle/Vundle.vim': Not a directory

I think it has to do with the /.vim directory being hidden, but I couldn't get past this.

  • That looks like a permission issue: does ~/.vim/bundle exists? If it exists what are its permissions?
    – statox
    Dec 20 '17 at 13:11
  • I don't think it does, but when I try to create it with mkdir /.vim/bundle I get mkdir: /Users/carlo/.vim: Not a directory
    – Fibonacho
    Dec 20 '17 at 14:14
  • You get an error because you don't have a vim directory. If you can execute mkdir -p ~/.vim/bundle with no error, you should be able to clone your repo.
    – statox
    Dec 20 '17 at 14:33
  • I do have a /.vim directory though (it comes up when I execute ls -a). That's what's puzzling me.
    – Fibonacho
    Dec 20 '17 at 15:39

You said when you run ls -a, you see /.vim. First, make sure you have it in your home directory, try running cd and then ls -a. /.vim is not ~/.vim, and you really shouldn't be making folders like that in the / directory (which is computer-wide and has special permissions).

You should be making your dir with this:

mkdir ~/.vim/bundle

Note the ~ at the start.

If this fails with another "not a directory", run

mkdir ~/.vim

and then run the first command again.

After this, you can run git clone successfully. For what it's worth, you don't need to specify the path, just cd ~/.vim/bundle and run git clone <url>. It will automatically name it the same as the git repo, which is "Vundle".

  • git clone makes all intermediate directories. For example I just tried git clone git@github.com:Carpetsmoker/st.git ~/this/does/not/exist/yet and that worked without problems. As far as I know, git has always done this; but perhaps (very) old versions don't? Dec 20 '17 at 23:37
  • @Carpetsmoker Doesn't work for me, are you using OS X?
    – user11389
    Dec 20 '17 at 23:41
  • Linux master race of course :-) Git version 2.15.1 Dec 20 '17 at 23:42
  • 1
    Do you have a file named ~/.vim @Fibonacho? What does ls -l ~/.vim say? Dec 21 '17 at 11:10
  • 1
    @Carpetsmoker it seems that was indeed the problem. Thanks for your time!
    – Fibonacho
    Dec 21 '17 at 13:28

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.