Starting a comparison
F4, then the same file dialog twice.
- Press F4. Row 1 says “Select left file”; the dialog works exactly as it does for opening (see 2.1.2).
- Choose the left-hand file. The message row says “Left selected: /etc/nginx/nginx.conf; choose the right file” and row 1 becomes “Select right file”.
- Choose the right-hand file. The comparison appears, with “Comparison complete: 7 difference blocks”.
On entry Erya copies both files into a temporary directory, and every block you copy across is written to those copies. The originals change only when you confirm (see 3.4.7). Merge as freely as you like; Esc abandons everything if you change your mind.
- Large files (64 MiB and up): “Side-by-side comparison is unavailable in large-file mode to avoid loading the complete file into memory”.
- Binary files: “Binary files cannot be compared side by side”.
Both are refused while you are still choosing, so you never reach the comparison screen.
Reading the screen
Half each, a rule between them, and a line-number column on both sides.
| Element | What it is |
|---|---|
| Row 2 (hint bar) | Becomes the two filenames, half the width each, with the divider aligned to the one below. |
| Line numbers | Four digits per side, followed by two marker cells: the kind of difference and the cursor. |
| Blank rows | Where one side has no counterpart. This is the alignment at work — identical lines stay opposite each other. |
| Status bar | Which row of how many, which difference of how many, the horizontal column, then the legend. |
| Message row | Permanently shows the comparison keys, replaced by the result of whatever you just did. |
The three difference markers
You never have to rely on colour alone — each kind has a symbol.
| Symbol | Meaning | On screen |
|---|---|---|
| ≠ | Present on both sides, different content | Marked on both sides, and the differing characters within the line are highlighted more strongly |
| - | Left side only | Marked on the left; the right side is blank |
| + | Right side only | Marked on the right; the left side is blank |
| (blank) | Identical | No marker |
Two more markers are about position rather than difference:
- ▶ is the cursor, shown on both sides at once — the two cursors are tied together.
- A brightened row is the row the cursor is on.
- Yellow line numbers mark the “current difference block”, which is where N and P stop.
When the status bar says “Current difference 2/7”, the 7 counts blocks, not lines. Five consecutive changed lines are one block: N skips the whole thing, and copying takes it as a unit.
The cursor and the current difference
The single most confusing thing about this screen.
The cursor (▶)
Moved with ↑ ↓, PageUp PageDown, Home End, one row at a time, stopping on identical rows as well.
Copying a difference looks at the row the cursor is on.
The current difference (yellow numbers)
Moved with N and P, one block at a time, stopping only where there is a difference.
Jumping there moves the cursor too, so you can copy immediately afterwards.
If Shift+→ appears to do nothing and the message row says “There is no difference block to copy at the cursor”, this is why. Press N to land on a difference first.
Moving and scrolling
The two sides always move together.
| Key | What it does |
|---|---|
| ↑ ↓ | Cursor one row, with the view following |
| PageUp PageDown | A page at a time |
| Home End | To the very start or end of the comparison |
| ← → | Scrolls both sides horizontally, for long lines |
| Ctrl+← Ctrl+→ | Horizontally, eight columns at a time |
| N | Next difference block |
| P | Previous difference block |
N and P wrap around past the last block, so you can keep pressing to circle the whole file.
Copying a difference across
Two keys, and the arrow points the way it goes.
| Key | What it does |
|---|---|
| Shift+→ | Copies the block at the cursor from left to right (into the right temporary file) |
| Shift+← | Copies the block at the cursor from right to left |
- Afterwards: “Current difference copied from left to the right temporary file; 6 blocks remain” — it tells you how many are left.
- The cursor and the view stay where they are, so you can check the result. Press N when you want the next one.
- The whole block is copied, not one line of it.
- If writing the temporary file fails (a full disk, permissions) you get “Could not update the temporary file: …”.
N to a difference → look at it → Shift+→ or Shift+← to take it, or N again to leave it → carry on until it wraps → Ctrl+S to apply. Four keys, start to finish.
Applying to the originals
Press the save key of your profile (Ctrl+S by default), then answer Y or N.
- Press Ctrl+S. With nothing copied yet you simply get “There are no temporary changes to apply”, and no question.
- Press Y to confirm. Erya first checks whether the originals changed externally, and only then writes.
- Success. “Confirmed and overwritten 2 original files” — only the side you actually changed is written.
- Failure. “Original files were not overwritten: …”, and neither side is touched. Usually this means someone else moved an original while you were merging.
- Press N to cancel. “Overwrite cancelled; temporary changes are still available” — your merging survives, so you can continue or apply later.
It is the same protection as an ordinary save (see 2.1.7). Comparisons take a while, and having an original replaced by git checkout halfway through is entirely normal — Erya will not quietly write over that.
Three choices on the way out
With unapplied changes, Esc asks first.
| Key | Result |
|---|---|
| Y | Overwrite the originals and leave (with the same external check). |
| N | Discard the temporary changes and leave. Nothing you copied counts; the originals are untouched. |
| Esc | Back to the comparison, nothing done. |
With no temporary changes at all, Esc just leaves without asking.
The temporary directory exists only for the duration of the comparison. After you leave with N, the merging cannot be recovered — but the originals are still there, so starting again costs nothing but time.
Common problems
Seven situations in the comparison view.
| Symptom | Cause and fix |
|---|---|
| Shift+→ does nothing | The cursor is on an identical row. Press N first (3.4.4). |
| Refused while choosing files | A large or binary file was selected (3.4.1). |
| Merged, but the originals are unchanged | You edited the temporary copies. Press Ctrl+S and confirm with Y (3.4.7). |
| “Original files were not overwritten” | An original changed externally during the comparison. Leave and start again (3.4.7). |
| The merging disappeared after exiting | N was pressed on the way out — discard and exit (3.4.8). |
| The end of a long line is off screen | Scroll with ← →; both sides move together (3.4.5). |
| The difference count looks wrong | It counts blocks, not lines; consecutive changes are one block (3.4.3). |