diff options
author | Markus Heidelberg <markus.heidelberg@web.de> | 2009-01-17 22:28:45 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-18 12:29:32 -0800 |
commit | 71ee483abd44b1a69cd2ac005c75d3c885830a5c (patch) | |
tree | 96d139c37ec48d8240d46b7bf741a7abbb9423c3 /git-mergetool.sh | |
parent | a83c88525ed6d8d940f8cf7f21e92b189f7844e3 (diff) | |
download | git-71ee483abd44b1a69cd2ac005c75d3c885830a5c.tar.gz |
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 <C-w>l every time.
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Tested-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-mergetool.sh')
-rwxr-xr-x | git-mergetool.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/git-mergetool.sh b/git-mergetool.sh index b2d53752ae..00e1337306 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) |