I have the following configuration in my ~/.gitconfig
[diff]
tool = vimdiff
[diftool]
prompt = false
When I launch git difftool it opens up the buffers in read-only mode by default. I use it to review the changes before a commit and say I find some small change like a commented out line I have not removed or a JS console.log statement, I am forced to quit the tool and open the file and make the change. I would very much like a way to do the change within the visual diff window itself.
http://gitlog.wordpress.com/2011/03/30/git-1-7-4-2/ says that "“git difftool” didn’t tell (g)vimdiff that the files it is reading are to be opened read-only." From this I figure that this read-only behavior was desired.
I am curious to know why having a read-only behavior in difftool was chosen as the default.
Is there any way I can configure the difftool to allow read/write?
From git, vimdiff and dirdiff, I see that fugitive plugin for vim and git diffall script are also available as alternatives to make this diff reviewing process easier. Will using fugitive open up the possibility of using a read/write visual diff mode?
If you aren't using fugitive, you can toggle read-only mode (per pane!) with
:set readonly!
or
:set ro!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With