DataGrip 2020.1 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:

ButtonCommandDescription
Replace the fragment in the right-hand paneReplaceReplace the fragment in the right-hand pane with the one in the left-hand pane.
icons.diff.arrowRight.pngReplaceThe same as the previous command but in the other direction.
Insert the fragment in the left-hand paneInsert Insert the fragment in the left-hand pane after the corresponding fragment in the right-hand pane.

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

Insert the fragment in the right-hand paneInsertThe 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: 16 July 2020