gitu icon indicating copy to clipboard operation
gitu copied to clipboard

[feature-request] use +0 when calling vim to collect commit message

Open TLINDEN opened this issue 1 year ago • 1 comments

I'm not sure, if gitu calls vi[m] or $EDITOR itself of if it just calls git commit. If it calls it itself, then it would be good to add the +0 argument.

Currently it looks like this: I change a file, commit it and enter a commit message. I end up in line 4. Next time I want to enter another commit message, vim starts on line 4 again, so this time inside the comment section. I have to move the cursor to the top to enter the message.

TLINDEN avatar Sep 25 '24 13:09 TLINDEN

@TLINDEN Gitu just runs git commit, so git would be responsible for opening the editor.

The case is not the same when you open a file/diff with "enter".

I take you get a different result when running git commit from the terminal? Seems odd 🤔

altsem avatar Sep 25 '24 18:09 altsem

Just for reference of future users: this is how to fix this:

GIT_EDITOR="vim +0" gitu

TLINDEN avatar Feb 14 '25 10:02 TLINDEN