vim comparison code example Example: vim compare 2 files #open second file in vim with ":vsp mysecondfile.txt" then :windo diffthis