diffview.nvim icon indicating copy to clipboard operation
diffview.nvim copied to clipboard

How Can I Expand All Fold by Default in DiffviewFileHistory?

Open imroc opened this issue 3 years ago • 3 comments

Everytime I use DIffviewFileHistory to see commit changes, I need to press zR to expand all fold to see the complete file content, Is there a way or option can expand all fold by default?

imroc avatar Nov 16 '23 07:11 imroc

Same with @imroc, If there any way to unfold all code in diffview by default?

gaslight217 avatar Nov 17 '23 08:11 gaslight217

Find it, @imroc, https://github.com/sindrets/diffview.nvim/issues/236, try "foldenable = false"

gaslight217 avatar Nov 17 '23 08:11 gaslight217

@gaslight217 Thanks a lot! I use this config and it works for me:

      hooks = {
        diff_buf_win_enter = function()
          vim.opt_local.foldenable = false
        end,
      },

imroc avatar Nov 17 '23 09:11 imroc