`

set vim as git commit default editor

阅读更多
git config --global core.editor "vim"


echo "export EDITOR='vim'" >> ~/.profile

export EDITOR='vim'
export VISUAL=vim




# ~/.bashrc

export GIT_EDITOR='/Applications/MacVim.app/Contents/MacOS/Vim -g '

When I issue

git commit
then I get a macvim editor but on the command line I see this message

$ git commit
引用
Aborting commit due to empty commit message.



#work well
export GIT_EDITOR='/usr/local/bin/mate -w'


then you need
git config --global core.editor "mvim -f"

git config --global core.editor 'mvim -f --nomru -c "au VimLeave * !open -a iTerm"'


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics