ITeye博客

set vim as git commit default editor

夜鸣猪 · 2013-03-11 20:43 · ruby · git · 编程语言 · Markdown


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"'



评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。