Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Aguilar <davvid@gmail.com>2009-01-19 08:34:29 +0300
committerJunio C Hamano <gitster@pobox.com>2009-01-19 09:44:17 +0300
commit28da86a58d7861626eb9d33a1bcfa3e1e79a4d13 (patch)
tree9dda7504f9c26930a3d9c4043de0166f56f88ed6 /contrib
parent507cfcbd81196e14053bcd25735aaefabd99395d (diff)
difftool: put the cursor on the editable file for Vim
You only need to edit worktree files when comparing against the worktree. Put the cursor automatically into its window for vimdiff and gvimdiff to avoid doing <C-w>l every time. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/difftool/git-difftool-helper8
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/difftool/git-difftool-helper b/contrib/difftool/git-difftool-helper
index 0b266e3603..f013726d0f 100755
--- a/contrib/difftool/git-difftool-helper
+++ b/contrib/difftool/git-difftool-helper
@@ -78,12 +78,16 @@ launch_merge_tool () {
"$merge_tool_path" -o "$MERGED" "$LOCAL" "$REMOTE"
;;
- meld|vimdiff)
+ meld)
"$merge_tool_path" "$LOCAL" "$REMOTE"
;;
+ vimdiff)
+ "$merge_tool_path" -c "wincmd l" "$LOCAL" "$REMOTE"
+ ;;
+
gvimdiff)
- "$merge_tool_path" -f "$LOCAL" "$REMOTE"
+ "$merge_tool_path" -c "wincmd l" -f "$LOCAL" "$REMOTE"
;;
xxdiff)