Posted on , in Unix, tagged with git, vim
NeoVim Remote as git diff tool
In Neovim you can open a terminal and use git. This git should not open another neovim when editing commit messages or rebase commands. Instead, you want those files to open in a new tab. This can be accomplished with neovim-remote and the following line in your vimrc:
let $EDITOR="nvr --remote-tab-wait"
For diff and merge, you can configure git to call nvr
, in git config --global --edit
:
[diff]
tool = nvimdiff
[merge]
tool = nvimmerge
[difftool "nvimdiff"]
cmd = nvr -s -d \"$LOCAL\" \"$REMOTE\"
[mergetool "nvimmerge"]
cmd = nvr -s -d \"$LOCAL\" \"$BASE\" \"$REMOTE\" \"$MERGED\" -c 'wincmd J | wincmd ='