Last active
March 12, 2019 09:09
-
-
Save qvacua/3fed034df549d79852d731e3f2ef2dd9 to your computer and use it in GitHub Desktop.
gitconfig and VimR command for git difftool with DirDiff.vim
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
[difftool "vimrdiff"] | |
cmd = vimr --wait --nvim '+au GUIEnter * execute \"DirDiff\" argv(0) argv(1)' '+au GUIEnter * VimRDirDiff' $LOCAL $REMOTE | |
[diff] | |
tool = vimrdiff | |
# When you now use git difftool, then the VimR window will be maximized and all tools hidden. | |
# And these settings will not be persisted |
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
function! s:VimRTempMaxWin() abort | |
VimRMakeSessionTemporary " The tools, tool buttons and window settings are not persisted | |
VimRHideTools | |
VimRMaximizeWindow | |
endfunction | |
command! -nargs=0 VimRTempMaxWin call s:VimRTempMaxWin() | |
function! s:VimRDifDiff() abort | |
VimRTempMaxWin | |
sleep 500m " Yes, ugly, but I could not find a better solution. | |
normal o " Select the first file (again) to resize the panes. | |
endfunction | |
command! -nargs=0 VimRDirDiff call s:VimRDirDiff() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment