DataGrip 2019.3 Help

Differences viewer for files

Adjust the view by selecting the necessary comparison and highlighting options in the upper part.

Compare files

You can make changes to file contents by typing, and also by using the following buttons and context menu commands:

Button

Command

Description

Replace the fragment in the right-hand pane

Replace

Replace the fragment in the right-hand pane with the one in the left-hand pane.

icons diff arrowRight

Replace

The same as the previous command but in the other direction.

Insert the fragment in the left-hand pane

Insert

Insert the fragment in the left-hand pane after the corresponding fragment in the right-hand pane.

(Where appropriate, icons diff arrowRight turns into Insert the fragment in the left-hand pane when you press Ctrl.)

Insert the fragment in the right-hand pane

Insert

The same as the previous command but in the other direction.

(Where appropriate, Replace the fragment in the right-hand pane turns into Insert the fragment in the right-hand pane when you press Ctrl.)

To undo the changes, use Ctrl+Z.

Productivity tips

Compare two SQL queries

You can compare contents in the clipboard with selected part of an SQL query.

  1. Copy an SQL query to the clipboard.

  2. Select and right-click the query in the editor with which you want to compare the query in the clipboard. Without selecting the query, you compare the clipboard contents with the whole file.

  3. From the context menu, select Compare with Clipboard.

Compare two SQL queries
Last modified: 13 April 2020