git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH (resend) 2/2] difftool: put the cursor on the editable file for Vim
@ 2009-01-19  5:34 David Aguilar
  2009-01-19  6:43 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: David Aguilar @ 2009-01-19  5:34 UTC (permalink / raw)
  To: git; +Cc: gitster, David Aguilar

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>
---
 contrib/difftool/git-difftool-helper |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/contrib/difftool/git-difftool-helper b/contrib/difftool/git-difftool-helper
index 0b266e3..a6f862f 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)
-- 
1.6.1.149.g7bbd8

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-19  6:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-19  5:34 [PATCH (resend) 2/2] difftool: put the cursor on the editable file for Vim David Aguilar
2009-01-19  6:43 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).