I'm trying to set up git mergetool
to spawn vimdiff
with the following splits (and a configuration customized to each split):
Splits from the following buffers $LOCAL, $BASE, $REMOTE, & $MERGED (horizontal)[done]- Show line-numbers per split [Todo]
- Display only the name of the buffer variable in these three splits: $LOCAL, $BASE, $REMOTE. [Todo]
The $MERGED split statusline should show the filename from%t
[the $MERGED split is done]
I used this git configuration in my local repo:
git config merge.tool vimdiff
git config mergetool.vimdiff.cmd 'vim +"set number" +"set statusline=%t" -d -c "wincmd J" -O $MERGED $BASE $REMOTE $LOCAL'
git config merge.conflictstyle diff3
git config mergetool.prompt false
- In the configuration above, a status line substring should be displayed per-split but I can't find the right way to build a regex to reduce the filename in the statusline down to just one of the three desired buffer variable names (i.e. "BASE", "REMOTE", or "LOCAL"). A regex isn't required, but it seems like a promising option.
- Line numbers are only showing up in one split, but I want them in all four.
After much googling and many experiments, I still can't coerce vimdiff
into showing the status line / numbers I want... I am not using a statusline plugin such as vim-powerline. How do I configure my git options to spawn vimdiff
the way I need?
I included a screen capture of my existing git mergetool
splits.