Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Side by Side diffs #155

Closed
hipstersmoothie opened this issue Aug 15, 2018 · 4 comments
Closed

Side by Side diffs #155

hipstersmoothie opened this issue Aug 15, 2018 · 4 comments

Comments

@hipstersmoothie
Copy link

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
Copy link
Owner

see #161

@jesseduffield
Copy link
Owner

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
Copy link

haydenflinner commented Aug 7, 2023

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
Copy link

iklobato commented Jul 31, 2024

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
  1. 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
  1. Add the snipper from @haydenflinner
git: 
    paging:
        colorArg: always
        pager: delta --dark --paging=never --syntax-theme base16-256 -s
  1. Close and reopen lazygit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants