Skip to content

Help modify diff behavior when using neovim as git difftool #27512

Closed Answered by zeertzjq
vlad-tim asked this question in Q&A
Discussion options

You must be logged in to vote
|hl-DiffAdd|	DiffAdd		Added (inserted) lines.  These lines exist in
				this buffer but not in another.
|hl-DiffDelete|	DiffDelete	Deleted lines.  Also called filler lines,
				because they don't really exist in this
				buffer.

These are not removed lines. They are added lines, so you should see :h hl-DiffAdd and :h 'winhighlight'. Try this:

autocmd BufWinEnter * if &diff && argidx() == 0 | setlocal winhighlight=DiffAdd:DiffDelete,DiffDelete:DiffAdd | endif

Replies: 4 comments 16 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@clason
Comment options

@vlad-tim
Comment options

@clason
Comment options

@vlad-tim
Comment options

@clason
Comment options

Comment options

You must be logged in to vote
8 replies
@clason
Comment options

@vlad-tim
Comment options

@clason
Comment options

@zeertzjq
Comment options

@vlad-tim
Comment options

Answer selected by vlad-tim
Comment options

You must be logged in to vote
3 replies
@clason
Comment options

@bew
Comment options

@clason
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants