I have a few devices running Arch… Rasperrys, laptops, a NAS, etc

After an update I’ll run pacdiff to check for any updated configurations to look out for.

On the laptops I’ll use meld to compare and it’s nice to visually pick and choose what to update.

But for the headless units, I’m using vimdiff and it’s sometimes difficult to see what to change - esp. when a few lines in a block of changes needs picking and choosing.

What other approaches are you using for this?

  • @traches@sh.itjust.works
    link
    fedilink
    English
    4
    edit-2
    10 months ago

    I use nvim -D which is a lot like vimdiff. Few tips:

    • if the color scheme is unreadable, try :set termguicolors
    • dp to push a diff chunk to the other file
    • do to obtain a chunk from the other file
    • I have alt+hjkl bound to switch windows, which is nice

    It works really well for me, I haven’t wanted anything else. I’m one of those weirdos who spends all day using neovim, though

    • SayCyberOnceMore
      cake
      OP
      link
      English
      210 months ago

      Ah, ok, not tried that… I’ll check it out. Thanks

  • @Andy@programming.dev
    link
    fedilink
    210 months ago

    meld really is my favorite, but there’s also mcdiff from mc, in combination with your editor of choice (use_internal_edit=false). If you can like the internal editor, though, that’s got to be a better experience.

    I find a bunch of the themes are unreadable, so am rotating and eliminating with this Zsh function:

    mcdiff () {
      emulate -L zsh
    
      local skins=(
        gotar
        gray-green-purple256
        modarin256-defbg
        modarin256
        modarin256root-defbg
        modarin256root
        sand256
        seasons-autumn16M
        seasons-spring16M
        seasons-summer16M
        seasons-winter16M
        xoria256
        yadt256-defbg
        yadt256
      )
    
      local skin=${skins[RANDOM % $#skins + 1]}
    
      print -rl -- "Using skin: $skin:t:r"
      =mcdiff -c -S $skin $@
    }
    

    For a non-interactive diff viewer I find riff’s output pretty legible.

    Other than that, I’ve used a combination of tools with a broot config to browse and manage the diffs…

    • SayCyberOnceMore
      cake
      OP
      link
      English
      310 months ago

      Thanks. Interesting points to look at there. I like the look of riff for config comparison we do at work too - thanks!