Ask HN: Why not edit all code in 'diff' view?
1–10 of 11 posts
Re: Ask HN: Why not edit all code in 'diff' view?
#2Re: Ask HN: Why not edit all code in 'diff' view?
#3Re: Ask HN: Why not edit all code in 'diff' view?
#4Xcode has this except it's called Comparison view. It's one of the things I love about working in Xcode.
http://stackoverflow.com/questions/6013458/how-to-set-up-fil...
It has even some git integration.
http://www.appcoda.com/git-source-control-in-xcode/
https://aimatters.wordpress.com/2016/05/25/using-xcode-with-...
Re: Ask HN: Why not edit all code in 'diff' view?
#5Re: Ask HN: Why not edit all code in 'diff' view?
#6Re: Ask HN: Why not edit all code in 'diff' view?
#7All IDEs provide that...
Re: Ask HN: Why not edit all code in 'diff' view?
#8Re: Ask HN: Why not edit all code in 'diff' view?
#9To answer your question, "... why not?":
* oftentimes when I'm writing code I'd rather split the screen with another relevant file
* sometimes the diff is irrelevant (I started from scratch, or primarily added code instead of modifying or removing it)
* other times, it's enough to know only that a line has changed. I've configured Vim (with vim-git-gutter) to show symbols next to added and removed lines
Re: Ask HN: Why not edit all code in 'diff' view?
#10Even if you don't tdd, I would say that typically if you understand the code well enough to make a change, you should be able to write a replacement without referring to the old code. The diff should fit in your mind, so to speak. There are some exceptions, like when you're modifying a regex or some dense, opaque shell command, but in the course of modifying typical code I can't see a live diff being that useful to me