Search code examples
vimvi

VIM netrw creates directory but returns **error** (netrw) unable to make directory


I'm attempting to create a directory from within a netrc explorer window, however, upon creating the directory netrw returns error (netrw) unable to make directory. The directory is actually created in the background, but my cursor is brought to the error message and netrw does not update the directory listing.


Solution

  • Had the same issue, my problem was that I had set the wrong shell in my vimrc, changing that fixed it for me.

    To find the shell you're using do this in your terminal:

    echo $SHELL
    /bin/zsh
    

    Then I change my .vimrc to use the correct shell:

    set shell=/bin/zsh
    

    Then to verify Vim is using the right shell you can do:

    echo &shell
    /bin/zsh