Closed pirey closed 4 years ago
I did something like this to disable indent-lines in diff mode, works with fugitive Gdiffsplit
autocmd OptionSet diff IndentLinesDisable
hi @kazhala , i tried your solution and it only work when i open a diff, the problem is when i close the diff, indentLine is still disabled
do you know any autocmd event or option to revert it?
based on your suggestion, i tried something like this
augroup custom_indentLine
autocmd!
autocmd OptionSet diff call ToggleIndentLine()
augroup END
function! ToggleIndentLine()
if &diff
execute 'IndentLinesDisable'
else
execute 'IndentLinesEnable'
endif
endfunction
the indent line is disabled when i open a diff, but when i close diff window, the indent line still disabled.
i have confirmed that the &diff option changed back to 0, but it seems neovim doesn't detect when the &diff option set back to 0
do you know any autocmd event or option to revert it?
Sadly no, I remember I was facing the issue as well not being able to set it back.
Fixed.
it works, thanks
This is breaking my NERDTree startup on VimEnter
because the cursor now stays on the empty buffer instead of the NERDTree window.
@koallen Fixed.
as shown in the picture, the indent line highlighting doesn't match highlight for diff line, is it possible to get the same highlight for diff lines? or can i somehow disable the indent line when i'm opening a diff?
i'm using fugitive-vim :Gdiffsplit feature for the diff