Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git-commit unable to open vim

Tags:

Recently I installed bash-it into my terminal. Now, when I try to execute git commit the terminal shows me this error:

/usr/bin/mate -w: /usr/bin/mate: No such file or directory error: cannot run /usr/bin/mate -w: No such file or directory error: There was a problem with the editor '/usr/bin/mate -w'. Please supply the message using either -m or -F option.

Before bash-it, the commit command correctly opened vim. Of course I've tried to change the core.editor in git to "vim" but it does not work anyway.

Could you please help me to solve this? I really like vim, it was super easy and fast...I don't want to use TextMate to edit the commit message.

PS: I'm using Mac OSX

like image 454
imran3 Avatar asked Nov 14 '14 13:11

imran3


People also ask

What is Vim command in git?

Vim is a very useful and helpful editor for creating and editing different types of files more efficiently. Many new features are added in this editor that makes it a powerful editor. Many plugins are developed by many coders for this editor to increase and configure its core functionalities.


1 Answers

Try using the below command. Should be able to set your editor back to vi or vim. However, you might have to give the absolute path to vim.

git config --global core.editor vim 
like image 197
abalos Avatar answered Sep 19 '22 16:09

abalos