PhpStorm 2016.2 Help

Comparing Files

On this page:

Introduction

PhpStorm enables you to compare arbitrary files in project (including image files), selected file with the editor, or compare a file in the editor with the Clipboard contents. All comparisons are performed in the Differences viewer.

Comparing two files

  1. Press and keep holding Ctrl for Windows and Linux or for OS X and click the two files to compare in the Project tool window.
  2. On the context menu of the selection, choose Compare Files, or press Ctrl+D. The Differences Viewer for Files opens, with the differences being color-highlighted.
  3. View the differences and apply them, if necessary, using the chevron buttons icon_InsertReplaceicon_InsertReplace2.

    Note that keeping Ctrl (for Windows and Linux) or (for OS X) pressed turns the chevron buttons icon_InsertReplaceicon_InsertReplace2 to arrowRightDownarrowLeftDown. Click these buttons to append changes.

    Keeping Shift pressed turns the chevron buttons icon_InsertReplaceicon_InsertReplace2 to close1. Click this button to revert changes.

    compareFiles

Comparing a file in the editor with the Clipboard contents

  1. Open the desired file in the editor.
  2. Right-click the editor pane and choose Compare with Clipboard on the context menu.
  3. View and manage differences in the Differences Viewer for Files.

Comparing a file with the editor contents

  1. Right-click the desired file in the Project tool window.
  2. Choose Compare File with Editor on the context menu.
  3. View and manage differences in the Differences Viewer for Files.

See Also

Last modified: 20 July 2016