GIT_EDITOR not working with macvim

前端 未结 4 944
一生所求
一生所求 2021-02-01 01:25

This is what I have in my ~/.bashrc

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

When I issue

git comm         


        
相关标签:
4条回答
  • 2021-02-01 02:06

    I had a similar problem. Adding the --noplungin flag to vim solved it for me.

    0 讨论(0)
  • 2021-02-01 02:15

    This worked great for me.
    git config --global core.editor 'mvim -f --nomru -c "au VimLeave * !open -a iTerm"'
    If you are using Terminal.app instead of iTerm.app you can just switch it out. Source: https://github.com/b4winckler/macvim/wiki/FAQ (though they are using the EDITOR env variable instead of the gitconfig)

    0 讨论(0)
  • 2021-02-01 02:19

    I had the same problem. I fixed it by setting mvim as the default editor for git by running the following from the command line:

    git config --global core.editor "mvim -f"
    
    0 讨论(0)
  • 2021-02-01 02:22

    You need to supply the -f option to vim to ensure that it doesn't background itself.

    0 讨论(0)
提交回复
热议问题