# Diff & Merge

> **TL;DR**
> `File | Settings | Tools | Diff & Merge` for Windows and Linux
>
>
>
> `IntelliJ IDEA | Settings | Tools | Diff & Merge` for macOS
>
>
>
> `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) ![the Settings icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.settings.svg)

On this page, specify the default behavior of the [Diff Viewer](differences-viewer.html).

| Item | Description |
| --- | --- |
| Diff |
| Context lines | Use the slider to specify the number of context lines that will not collapse, when in the Diff Viewer you click the button ![Collapse all](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.collapseAll.svg) to [collapse the unchanged fragments](differences-viewer.html#collapse_unchanged). |
| Go to the next file after reaching last change | If this checkbox is selected, IntelliJ IDEA will suggest to press `F7` (Windows), `F7` (macOS), `F7` (IntelliJ IDEA Classic (macOS)), `⌘ ]` (macOS System Shortcuts), `F7` (XWin), `F7` (GNOME), `F7` (KDE), `F7` (Emacs), `F7` (Sublime Text), `F7` (Sublime Text (macOS)), `F7` (NetBeans), `F7` (Visual Studio), `F7` (Visual Studio (macOS)), `Ctrl+F7` (Eclipse), `⌃ F7` (Eclipse (macOS)) or `Shift+F7` (Windows), `⇧ F7` (macOS), `⇧ F7` (IntelliJ IDEA Classic (macOS)), `⌘ [` (macOS System Shortcuts), `Shift+F7` (XWin), `Shift+F7` (GNOME), `Shift+F7` (KDE), `Shift+F7` (Emacs), `Shift+F7` (Sublime Text), `⇧ F7` (Sublime Text (macOS)), `Shift+F7` (NetBeans), `Shift+F7` (Visual Studio), `⇧ F7` (Visual Studio (macOS)), `Shift+F7` (Eclipse), `⇧ F7` (Eclipse (macOS)) once more and compare other files |
| Merge |
| Automatically apply non-conflicting changes |    If this checkbox is selected, the interactive merge tool automatically merges all non-conflicting changes.      This is an equivalent to clicking ![Apply not conflicts](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.diff.applyNotConflicts.svg) in the [Merge](differences-viewer.html) dialog.    |
| Highlight modified lines in gutter | Select this checkbox if you want added/modified lines (relative to the base revision) to be highlighted in the gutter of the Merge dialog. |

## See also

### Procedures

[Configuring the IDE](configuring-project-and-ide-settings.html)  [Compare files, folders, and text sources](comparing-files-and-folders.html)

### Reference

[External tools settings](settings-tools-external-tools.html) [Diff Viewer for files](differences-viewer.html)

