Quick and Dirty : Vimdiff Tutorial
I recently started using exclusively Vim (and gVim) for my coding needs. Vimdiff is a tool that comes bundled with Vim and its a wonderful tool for comparing code and merging changes. If you'd prefer to use a non-Vim based diff tool, checkout visual diff tools in linux for more variety.
Keyboard Shortcuts:
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.
Ctrl W + Ctrl W - Switch to the other split window.
Labels:
vim
|
This entry was posted on 6:00 PM
and is filed under
vim
.
You can follow any responses to this entry through
the RSS 2.0 feed.
You can leave a response,
or trackback from your own site.
10 comments:
Thanks, I've been looking everywhere for this.
Very cool, thanks for the tip!
Thanks! Just what I was looking for.
Thanks a lot! I was looking around for these commands frantically. Its a great help. Thanks.
thanks a loads.... :) Jai ho!!
Hi,
Nice information. However, `Ctrl W + Ctrl W' is not required to switch windows. Ctrl W + W is enough to cycle windows. You can try Ctrl W + <any of the direction keys> to switch among windows in vimdiff or in vim with split windows.
For example:
Ctrl W + L => Switch to the right window, which is similar to pressing Ctrl W + <Right arrow>.
Regards.
Great quick tutorial.
Exactly what I was looking for.
Thanks for the great tip
Nice one! I learnt vimdiff from it.
while(As long as i remember vimdiff)
Thanks
To ignore whitespace use this command: set diffopt+=iwhite
To turn that back off use: set diffopt-=iwhite
Post a Comment