I am following this tutorial for setting opendiff for git: http://thomashunter.name/blog/set-opendiff-filemerge-as-your-git-diff-tool-on-os-x/
I open vi like it said in tutorial, write some lines and try :wq but get error - error E212: Can't open file for writing
I browsed stack overflow for a little bit, and tried typing
sudo vim ~/bin/git-diff.sh
But I am also getting the same error.
I haven't had much experience with unix based systems, so what am i to do?
You don't have a bin
directory below ~
(which is /Users/username
). The error message of "~/bin/git-diff.sh" [New DIRECTORY]
at the bottom of the vim screen should have been a hint
来源:https://stackoverflow.com/questions/15898593/vi-getting-an-error-e212-cant-open-file-for-writing