I would prefer to write my commit messages in Vim, but it is opening them in Emacs.
How do I configure Git to always use Vim? Note that I want to do this globally, not just for a single project.
I would prefer to write my commit messages in Vim, but it is opening them in Emacs.
How do I configure Git to always use Vim? Note that I want to do this globally, not just for a single project.
For Windows users who want to use Kinesics Text Editor
Create a file called 'k.sh', add the following text and place in your home directory (~):
At the git prompt type:
Just try
EDITOR=vim git commit
.Or you can set your EDITOR to vim by
export EDITOR=vim
in your bashrc.Atom as your git editor
For Textmate Users
This opens Textmate editor in when you want to edit your commits. Requires textmate command line tools to be installed.
git config --global core.editor "mate -w"
Setting Sublime Text 2 as Git commit editor in Mac OSX 10
Run this command:
Or just:
Windows: setting notepad as the default commit message editor
Hit Ctrl+S to save your commit message. To discard, just close the notepad window without saving.
In case you hit the shortcut for save, then decide to abort, go to File->Save as, and in the dialog that opens, change "Save as type" to "All files (*.*)". You will see a file named "COMMIT_EDITMSG". Delete it, and close notepad window.
Edit: Alternatively, and more easily, delete all the contents from the open notepad window and hit save. (thanks mwfearnley for the comment!)
I think for small write-ups such as commit messages notepad serves best, because it is simple, is there with windows, opens up in no time. Even your sublime may take a second or two to get fired up when you have a load of plugins and stuff.