How can I set up gVim as my editor on Git for Windows?

前端 未结 1 1317
北荒
北荒 2021-02-05 22:05

I\'d like to use gVim as my editor for Git commit messages. I realize Git has its own version of vim, but it\'s not quite the same as gVim (along with my _vimrc settings) which

相关标签:
1条回答
  • 2021-02-05 22:26

    You can use gVim with Git by configuring your core.editor to contain the path where you have gVim installed. You'll also want to run it in the foreground and not load your _viminfo file, which would position your cursor in the place where you finished your previous commit message.

    Taking note of the single and double quotes, you might do something like this:

    git config --global core.editor "'C:\Program Files (x86)\Vim\vim74\gvim.exe' -f -i NONE"
    
    0 讨论(0)
提交回复
热议问题