How to Quickly Open vimdiff from netrw — comparing selected files

The aim of this page📝 is to explain how to use vimdiff + netrw in vim to compare two selected files in Vim. I use this when working with various versions of JSON schemas pulled with igluctl from Snowplow’s iglu repository — to get quick differences between various versions. This is required if I am troubleshooting schema evolution issues or challenges. This is a doc about Vim, not Snowplow stack so I am skipping the igluctl part.

Pavol Kutaj
1 min readSep 17, 2024
  • Open the folder in Vim with :e <the_folder>
  • Navigate to each file using arrow keys.
  • Mark the files with mf - mf marks files in netrw.
  • Press md to call vimdiff on the selected files (up to 3 files).
  • md opens marked files in vimdiff.
  • vimdiff compares files side by side.

LINKS

https://vimhelp.org/netrw.txt.html https://vi.stackexchange.com/questions/31010/how-to-select-multipe-files-for-vimdif-using-netrw

ANKI

Q: What command marks files in netrw?
A: mf
Q: What command opens marked files in vimdiff?
A: md
Q: How many files can md open in vimdiff?
A: Up to 3 files.

--

--

No responses yet