:ls
shows my buffers and lists flags for each buffer, but doesn't list whether &diff
is set.
Plugins like unite's buffer source just rely on :ls
output.
Is there an easy way to list and manage which buffers are in diff mode (for those times when :diffget
fails due to more than two buffers in diff mode).
Ideally, I'd like something like :Unite buffer
that includes 'diff' for buffers with &l:diff
. A unite source that showed which buffers have certain variables would be cool: :Unite var diff scrollbind
that works like :Unite buffer
but appends 'diff' or 'scrollbind' to files with those options enabled.
:diffput
&:diffget
take a[bufspec]
which can be a buffer number or a unique partial filename. e.g.:diffput foo
. See:h dp
. Bonus tip:set diffopt+=hiddenoff
which turns off'diff'
when a buffer is hidden.