From 71ee483abd44b1a69cd2ac005c75d3c885830a5c Mon Sep 17 00:00:00 2001 From: Markus Heidelberg Date: Sat, 17 Jan 2009 22:28:45 +0100 Subject: [PATCH] mergetool: put the cursor on the editable file for Vim MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When resolving conflicts, you only need to edit the $MERGED file. Put the cursor automatically into its window for vimdiff and gvimdiff to avoid doing l every time. Signed-off-by: Markus Heidelberg Tested-by: SZEDER Gábor Signed-off-by: Junio C Hamano --- git-mergetool.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/git-mergetool.sh b/git-mergetool.sh index b2d53752a..00e133730 100755 --- a/git-mergetool.sh +++ b/git-mergetool.sh @@ -200,14 +200,19 @@ merge_file () { fi status=$? ;; - meld|vimdiff) + meld) touch "$BACKUP" "$merge_tool_path" "$LOCAL" "$MERGED" "$REMOTE" check_unchanged ;; + vimdiff) + touch "$BACKUP" + "$merge_tool_path" -c "wincmd l" "$LOCAL" "$MERGED" "$REMOTE" + check_unchanged + ;; gvimdiff) touch "$BACKUP" - "$merge_tool_path" -f "$LOCAL" "$MERGED" "$REMOTE" + "$merge_tool_path" -c "wincmd l" -f "$LOCAL" "$MERGED" "$REMOTE" check_unchanged ;; xxdiff) -- 2.30.2