From: David Aguilar Date: Mon, 19 Jan 2009 05:34:29 +0000 (-0800) Subject: difftool: put the cursor on the editable file for Vim X-Git-Tag: v1.6.2-rc0~126 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=28da86a58d7861626eb9d33a1bcfa3e1e79a4d13;p=git.git 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 l every time. Signed-off-by: David Aguilar Signed-off-by: Junio C Hamano --- diff --git a/contrib/difftool/git-difftool-helper b/contrib/difftool/git-difftool-helper index 0b266e360..f013726d0 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)