Search code examples
phpstorm

PhpStorm Is there a way to turn "differences only" on on Difference viewer


PhpStorm Is there a way to turn "differences only" on on Difference viewer

This view will show a concise view of only the differences.


Solution

  • Something like Beyond Compare has (for example) where only lines with differences are shown?

    AFAIK -- no.

    But you may use "Collapse unchanged fragments" button on diff viewer toolbar and it will leave 3-4 lines of context around modified lines hiding the rest of the unmodified code. This can be used in both "Side-by-side viewer" mode (2 panels -- right and left) and "Unified viewer" mode (all merged into one view).

    For example (PhpStorm 2016.3.2 using "unified viewer" mode):

    enter image description here

    (the only difference between these 2 files are those few added lines with green background)