{"thread":{"id":"17230","subject":"[PATCH] mergetool: put the cursor on the editable file for Vim","startedAt":"2009-01-17T21:28:45Z","lastAt":"2009-01-18T20:29:38Z","messageCount":4,"participants":["Markus Heidelberg","Junio C Hamano","SZEDER Gábor"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"100886","messageId":"200901172228.45450.markus.heidelberg@web.de","threadId":"17230","inReplyTo":null,"subject":"[PATCH] mergetool: put the cursor on the editable file for Vim","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-01-17T21:28:45Z","receivedAt":"2009-01-17T21:28:45Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"When resolving conflicts, you only need to edit the $MERGED file. Put\nthe cursor automatically into its window for vimdiff and gvimdiff to\navoid doing <C-w>l every time.\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n git-mergetool.sh |    9 +++++++--\n 1 files changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/git-mergetool.sh b/git-mergetool.sh\nindex b2d5375..00e1337 100755\n--- a/git-mergetool.sh\n+++ b/git-mergetool.sh\n@@ -200,14 +200,19 @@ merge_file () {\n \t    fi\n \t    status=$?\n \t    ;;\n-\tmeld|vimdiff)\n+\tmeld)\n \t    touch \"$BACKUP\"\n \t    \"$merge_tool_path\" \"$LOCAL\" \"$MERGED\" \"$REMOTE\"\n \t    check_unchanged\n \t    ;;\n+\tvimdiff)\n+\t    touch \"$BACKUP\"\n+\t    \"$merge_tool_path\" -c \"wincmd l\" \"$LOCAL\" \"$MERGED\" \"$REMOTE\"\n+\t    check_unchanged\n+\t    ;;\n \tgvimdiff)\n \t    touch \"$BACKUP\"\n-\t    \"$merge_tool_path\" -f \"$LOCAL\" \"$MERGED\" \"$REMOTE\"\n+\t    \"$merge_tool_path\" -c \"wincmd l\" -f \"$LOCAL\" \"$MERGED\" \"$REMOTE\"\n \t    check_unchanged\n \t    ;;\n \txxdiff)\n-- \n1.6.1.154.g97e2f\n"},{"id":"100905","messageId":"7v7i4t4crp.fsf@gitster.siamese.dyndns.org","threadId":"17230","inReplyTo":"200901172228.45450.markus.heidelberg@web.de","subject":"Re: [PATCH] mergetool: put the cursor on the editable file for Vim","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-18T01:35:22Z","receivedAt":"2009-01-18T01:35:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Markus Heidelberg <markus.heidelberg@web.de> writes:\n\n> When resolving conflicts, you only need to edit the $MERGED file. Put\n> the cursor automatically into its window for vimdiff and gvimdiff to\n> avoid doing <C-w>l every time.\n\nI think this is sensible.\n\nI do not use vim, and I do not know if the patch does what it claims to\ndo, though.\n"},{"id":"100966","messageId":"20090118141854.GA25155@neumann","threadId":"17230","inReplyTo":"7v7i4t4crp.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] mergetool: put the cursor on the editable file for Vim","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2009-01-18T14:18:54Z","receivedAt":"2009-01-18T14:18:54Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Sat, Jan 17, 2009 at 05:35:22PM -0800, Junio C Hamano wrote:\n> Markus Heidelberg <markus.heidelberg@web.de> writes:\n> \n> > When resolving conflicts, you only need to edit the $MERGED file. Put\n> > the cursor automatically into its window for vimdiff and gvimdiff to\n> > avoid doing <C-w>l every time.\n> \n> I think this is sensible.\n> \n> I do not use vim, and I do not know if the patch does what it claims to\n> do, though.\n\nIt does.\n\nTested-by: SZEDER Gábor <szeder@ira.uka.de>\n"},{"id":"101053","messageId":"7vbpu4we6l.fsf@gitster.siamese.dyndns.org","threadId":"17230","inReplyTo":"20090118141854.GA25155@neumann","subject":"Re: [PATCH] mergetool: put the cursor on the editable file for Vim","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-18T20:29:38Z","receivedAt":"2009-01-18T20:29:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"SZEDER Gábor <szeder@ira.uka.de> writes:\n\n> On Sat, Jan 17, 2009 at 05:35:22PM -0800, Junio C Hamano wrote:\n>> Markus Heidelberg <markus.heidelberg@web.de> writes:\n>> \n>> > When resolving conflicts, you only need to edit the $MERGED file. Put\n>> > the cursor automatically into its window for vimdiff and gvimdiff to\n>> > avoid doing <C-w>l every time.\n>> \n>> I think this is sensible.\n>> \n>> I do not use vim, and I do not know if the patch does what it claims to\n>> do, though.\n>\n> It does.\n>\n> Tested-by: SZEDER Gábor <szeder@ira.uka.de>\n\nThanks, both.\n"}]}