在Team work的作業環境下,該如何將別人的程式有效的結合自己的程式,當然你可以一份一份的將程式碼看過一遍,在區分找出不同之處加以修改,不過這樣的過程非常耗時且毫無效率可言,於是就有人想出該如何利用其他工具來達到目的,vimdiff就是用來分辨兩者的程式碼有何不同且能修改程式。
Work Env.
#apt-get install vim-full
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.
:diffupdate - diff update
:syntax off - syntax off
zo - open folded text
zc - close folded text
Piggy Note
在Windows裡用了許多好用的軟體作為寫程式的輔助,但在Linux中的概念總覺得不太方便界面不人性化,不過在vimdiff中打破這項觀念,這套軟體真的可以跟beyond compare作抗衡。
Referance
http://www.debianadmin.com/vimdiff-edit-two-or-three-versions-of-a-file-with-vim-and-show-differences.html
http://amjith.blogspot.com/2008/08/quick-and-dirty-vimdiff-tutorial.html
No comments:
Post a Comment