jesseduffield / lazygit

simple terminal UI for git commands
MIT License
52.66k stars 1.84k forks source link

Side by Side diffs #155

Closed hipstersmoothie closed 4 years ago

hipstersmoothie commented 6 years ago

Is your feature request related to a problem? Please describe.

I'm way better at reading side by side diffs

Describe the solution you'd like

LazyGit can be configured to show side by side diffs

jesseduffield commented 6 years ago

see https://github.com/jesseduffield/lazygit/pull/161

jesseduffield commented 4 years ago

This has now been implemented. See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md

If anybody would like to see changes to the feature, let me know :) closing

haydenflinner commented 1 year ago

Is there a minimal example of how to get side by side diffs from this custom pager support? from the pictures it looks like ydiff will do the trick, is that the best option?

Edit found this from reddit:

cargo install git-delta
# Put this in ~/.config/lazygit/config.yml
git: 
    paging:
        colorArg: always
        pager: delta --dark --paging=never --syntax-theme base16-256 -s
iklobato commented 3 months ago

For those who are new at lazygit, here is the step by step to make it show git diff side by side

  1. Install git delta

    $ brew install git-delta
  2. Open the configuration file

    Linux: ~/.config/lazygit/config.yml
    MacOS: ~/Library/Application\ Support/lazygit/config.yml
    Windows: %LOCALAPPDATA%\lazygit\config.yml (default location, but it will also be found in %APPDATA%\lazygit\config.yml

    or

    Linux: ~/.config/jesseduffield/lazygit/config.yml
    MacOS: ~/Library/Application\ Support/jesseduffield/lazygit/config.yml
    Windows: %APPDATA%\jesseduffield\lazygit\config.yml
  3. Add the snipper from @haydenflinner

    git: 
    paging:
        colorArg: always
        pager: delta --dark --paging=never --syntax-theme base16-256 -s
  4. Close and reopen lazygit