1

IntelliJ has a nice feature in the overview of the staged area, where you can make changes to the files in the staging area while having the diff overview. In the Magit overview of staged changes I would also like to make changes. Is this possible?

How can I make changes to files in a view where I see the diff?

2

Magit does not currently allow editing diffs directly. I am considering to allow this in v3, but this would require significant and expensive changes, so I might end up not doing it.

Meanwhile you can very easily jump to the correct location in the file-visiting buffer by just pressing RET. (It might be nice if diff-hl-mode were enabled in that buffer.) Or you could give Magit's Ediff integration a try. To do so press e.

  • maybe the ediff-stage command is worth mentioning here? It's not precisely editing a diff like @erwin asked, but it does show differences while editing. – npostavs Sep 1 '16 at 13:16
  • @npostavs You mean magit-ediff-stage I think. – JeanPierre Sep 1 '16 at 13:52
  • Or just RET to visit the file at the correct position. – tarsius Sep 1 '16 at 13:54
  • Awesome to get a response from the maintainer :). I will use RET for now. Thanks. – Erwin Rooijakkers Sep 1 '16 at 14:18
  • MaintainerS, npostavs is a maintainer too. And you are welcome. – tarsius Sep 1 '16 at 14:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.