vimdiff - use vim diff tools

To open a diff window,

  • VIM
    vimdiff
    diffthis in vim window
  • NVIM
    nvim -d
    diffthis

You can use the following basic commands to merge:
do - Get changes from other window into the current window.
dp - Put the changes from current window into the other window.
]c - Jump to the next change.
[c - Jump to the previous change.
zo - Open folded lines.
zc - Close folded lines.
zr - Unfold both files completely.
zm - Fold both files completely.
Ctrlww - change window.
``:only | wq` - quit other windows, write and quit.

posted @ 2023-07-16 11:27  devindd  阅读(9)  评论(0编辑  收藏  举报