sobota 12. apríla 2008

vimdiff howto

Having only text mode available I choose vimdiff. After some time spent browsing manuals (the is very good) I realized that vimdiff is useful tool.

Little hints for newbies:
ctrl+w ctrl+w - switch windows
do - diff obtain
dp - diff put
[c - previous difference
]c - next difference
:diffupdate - diff update ;)
:syntax off - syntax off
zo - open folded text
zc - close folded text

There is also possibility to run
vimdiff file1 directory2
and vimdiff will try to open directory2/file1 as second file.

Update (davitenio):
If there are only two files you can copy differences with:

There is also quite interesting article about using vimdiff as subversion diff tool.

1 komentár:

Felipe povedal(a)...

nice tips, thanks! I like 'do' and 'dp'