4 ms·
I have to say the only time I ever pipe directly to vim in a real world scenario is when I want to see a diff in color: diff file1 file2 | vim - Gives you
by iopuy 11y ago
I have to say the only time I ever pipe directly to vim in a real world scenario is when I want to see a diff in color:
diff file1 file2 | vim -
Gives you the diff but colorized with Vim. Handy little trick.
- Ianvdl 11y agoWhy not run vimdiff directly?
- d33 11y agoOr vimcat: https://github.com/ofavre/vimcat https://github.com/ofavre/vimcat Or pygments: pygmentize -l diff
- super_mario 11y agoOr just: vim -d file1 file2.
- iopuy 11y agoThis brings up a side by side comparison of the documents. This is different than the pure diff.
- super_mario 11y agoSure, for that there is also colordiff.
- iopuy 11y agoYeah, there are many other external tools that can accomplish this. Piping directly to Vim just allows us install one less.