@matheusbsbs / matheus-bagliano / commits / 28da86a58d
Fork 0

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>

David Aguilar committed Jan 18, 2009 at 21:34 UTC 28da86a58d7861626eb9d33a1bcfa3e1e79a4d13
1 file changed +6 -2
contrib/difftool/git-difftool-helper
+6 -2
@@ -78,12 +78,16 @@ launch_merge_tool () {
78 "$merge_tool_path" -o "$MERGED" "$LOCAL" "$REMOTE"
79 ;;
80
81 - meld|vimdiff)
81 + meld)
82 "$merge_tool_path" "$LOCAL" "$REMOTE"
83 ;;
84
85 + vimdiff)
86 + "$merge_tool_path" -c "wincmd l" "$LOCAL" "$REMOTE"
87 + ;;
88 +
89 gvimdiff)
86 - "$merge_tool_path" -f "$LOCAL" "$REMOTE"
90 + "$merge_tool_path" -c "wincmd l" -f "$LOCAL" "$REMOTE"
91 ;;
92
93 xxdiff)