Created
August 4, 2016 16:26
-
-
Save huytd/78c676a797f81eb08cdedf5400e1b6a3 to your computer and use it in GitHub Desktop.
Use neovim as diff tool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[merge] | |
tool = vimdiff | |
[mergetool] | |
prompt = true | |
[mergetool "vimdiff"] | |
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J' | |
[difftool] | |
prompt = false | |
[diff] | |
tool = vimdiff |
First one shouldnt have a "$" in case thats giving you problems. Otherwise this worked perfectly for me.
Why is the first wincmd with $ and the second without?
$wincmd w
focuses the last window because$
always references the highest window number.wincmd J
moves the focused window to the bottom, so in this case the window for the merged file view.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why is the first wincmd with $ and the second without?