Skip to main content
added 75 characters in body
Source Link
Tobias Heinicke
  • 1.9k
  • 1
  • 12
  • 17

If you want to use vim for comparison like in vimdiff, you could do something like this:

Edit your .vimrc and add:

nmap <F8> :w !vim -M -R - -c ":vnew % \| windo diffthis"<CR><CR>

From there on you will see your changes and can quit the diff view using qall like in vimdiff by pressing F8 in command mode. Replace F8 with any key you like.

Edit: Added -M to disallow any modification, because it is not save.

If you want to use vim for comparison like in vimdiff, you could do something like this:

Edit your .vimrc and add:

nmap <F8> :w !vim -R - -c ":vnew % \| windo diffthis"<CR><CR>

From there on you will see your changes and can quit the diff view using qall like in vimdiff by pressing F8 in command mode. Replace F8 with any key you like.

If you want to use vim for comparison like in vimdiff, you could do something like this:

Edit your .vimrc and add:

nmap <F8> :w !vim -M -R - -c ":vnew % \| windo diffthis"<CR><CR>

From there on you will see your changes and can quit the diff view using qall like in vimdiff by pressing F8 in command mode. Replace F8 with any key you like.

Edit: Added -M to disallow any modification, because it is not save.

Source Link
Tobias Heinicke
  • 1.9k
  • 1
  • 12
  • 17

If you want to use vim for comparison like in vimdiff, you could do something like this:

Edit your .vimrc and add:

nmap <F8> :w !vim -R - -c ":vnew % \| windo diffthis"<CR><CR>

From there on you will see your changes and can quit the diff view using qall like in vimdiff by pressing F8 in command mode. Replace F8 with any key you like.