From: Markus Heidelberg Date: Sat, 17 Jan 2009 21:28:45 +0000 (+0100) Subject: mergetool: put the cursor on the editable file for Vim X-Git-Tag: v1.6.2-rc0~129 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=71ee483abd44b1a69cd2ac005c75d3c885830a5c;p=git.git mergetool: put the cursor on the editable file for Vim 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 --- 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)