On Windows, I ran
git config --global --replace-all merge.tool gvimdiff
git config --global --replace-all mergetool.gvimdiff.path "C:/Program Files/Vim/vim90/gvim.exe"
git config --global --replace-all mergetool.gvimdiff.trustExitCode false
git config --global --replace-all merge.conflictstyle diff3
to set gvim as git mergetool.
I want to set a different color when git merge. I found
if &diff
colorscheme codedark
endif
does not work because when git merge starts, &diff is 0.
Questions: In .vimrc, how to tell if gvim is under git 3way merge or not?
Thanks for your suggestion.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Thanks.
autocmd VimEnter if &diff | colorscheme codedark | endif
does not work.
I try "echo v:argv", which shows that by default gvim does not start with "-d". And the diff happen after load. I think that's why &diff does not work
"echo $GIT" have some info. But it's not cross platform for Windows/Linux/Mac
Thanks, anyway.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.
Hi @vim-ml ,
For cmd = "vim -d -c '4wincmd w | wincmd J | wincmd =' $LOCAL $BASE $REMOTE $MERGED"
Do you know how to use " git config --global --replace-all XXX" to make a global setting?
Thanks.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you were mentioned.
Just a note that using (g)vimdiff as a mergetool has a rather complicated (though useful) setup sequence that involves parsing a custom layout string. So you'd probably need a more specific check of v:argv
to match with the invocation Git actually uses when running git mergetool -t gvimdiff
.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you were mentioned.