[HN Gopher] Show HN: GitHub style split diffs in your terminal
       ___________________________________________________________________
        
       Show HN: GitHub style split diffs in your terminal
        
       Author : milkbikis
       Score  : 43 points
       Date   : 2021-05-01 17:05 UTC (5 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | kbd wrote:
       | I already use delta for this: https://github.com/dandavison/delta
       | 
       | I thought delta was fairly well-known by now so I was surprised
       | to see this project not mention it (the readme already has a
       | section for that). I wonder what they've chosen to do
       | differently, besides write it in Node.js.
        
         | milkbikis wrote:
         | Yeah I (un)fortunately learned about delta too late or I
         | probably wouldn't have made this. The main difference is that
         | delta's default styles and appearance did not appeal to me. I'm
         | sure it can be customized, but I wanted something that looked
         | great by default. I especially like that the syntax
         | highlighting matches vscode's since that's the editor I use for
         | work.
        
           | kbd wrote:
           | > syntax highlighting matches vscode
           | 
           | An that's cool. I've always had a dream of having the same
           | syntax highlighting set up everywhere: vscode, bat, vim, git
           | diff... etc.
        
         | petepete wrote:
         | I use Delta and enjoy it, but using it with Git is a bit
         | frustrating.
         | 
         | I wish it was able to automatically switch from side-by-side to
         | vertical diffs depending on my terminal widt, or at least
         | override it with --side-by-side.
        
           | kbd wrote:
           | Yes! This is my number one thing as well. Let me dig up the
           | tickets...
           | 
           | Edit: https://github.com/dandavison/delta/issues/493#issuecom
           | ment-...
        
           | milkbikis wrote:
           | Yes this is the default behavior for git-split-diffs:
           | https://github.com/banga/git-split-diffs#narrow-terminals
        
         | ComputerGuru wrote:
         | It's definitely nice that delta doesn't have a run-time
         | dependency on node.
        
       | inshadows wrote:
       | > package.json
       | 
       | Bye.
       | 
       | Context: What JS dependencies do is unheard of:
       | https://news.ycombinator.com/item?id=26889543
        
       | weitzj wrote:
       | I enjoy having good terminal ergonomics for Git.
       | 
       | What works for me is tig for git diffs.
       | 
       | Also very impressive is kitty-diff. If you use kitty as your
       | OpenGL enabled terminal
       | https://sw.kovidgoyal.net/kitty/kittens/diff.html
        
         | kbd wrote:
         | I forgot kitty has kitty-diff! I love kitty as my terminal.
        
       | gigatexal wrote:
       | I've been looking for just this!!! Thank you!!
        
       | seabass wrote:
       | This is cool! A bit slow to start up, probably due to starting up
       | a node process each run, but looks great. Wondering if you have a
       | theme that doesn't include a background color as I quite like my
       | terminal's defaults.
        
       | dikaio wrote:
       | Nice work!
        
       | manannayak wrote:
       | Nice work, banga!
        
       | bovine3dom wrote:
       | Related but for single pane diffs: https://github.com/so-
       | fancy/diff-so-fancy
        
       | nfoz wrote:
       | I just use `vimdiff`, but this looks better.
        
         | Brian_K_White wrote:
         | Same. I mean... vim, right there already for free, and the
         | invocation is rather ridiculously simpler.
         | 
         | And vimdiff is even an editor not just a viewer.
         | 
         | Now if it was say, Meld in a terminal, that would be worth
         | talking about and I installing some stack as a dependency.
        
         | gnufx wrote:
         | Bad luck! Emacs Ediff worked well for me before Git, and it
         | still does (frequently in a tty, and preferably not with Git).
        
       ___________________________________________________________________
       (page generated 2021-05-01 23:00 UTC)