5 ms·
Another little known diff power tool: vim -d old.txt new.txt This will open two files in diff mode. You can then use a whole host of fancy keybindings to
by jez 6y ago
Another little known diff power tool:
vim -d old.txt new.txt
This will open two files in diff mode. You can then use a whole host of fancy keybindings to edit the two files in a diff-aware way ("apply this hunk to that file" / manually edit a file and then re-render the diff / "fold or expand all non-hunk text" / etc.). For more:
:help diff
or see here https://neovim.io/doc/user/diff.html https://neovim.io/doc/user/diff.html
- heeen2 6y agoI am a big fan of the patchreview plugin, I use it every day. It opens a multifile diff (e.g. git diff patch output) each file in a vim tab. https://github.com/junkblocker/patchreview-vim https://github.com/junkblocker/patchreview-vim $ gvim -c"DiffReview git diff origin/master"
- hnlmorg 6y agoGood shout. I've used that a fair few times when working through some more complex diffs. It's also often symlinked as `vimdiff`