← XeFM English | 日本語 · crftwr/xefm on GitHub · craftware

Directory Sync

English | 日本語

The directory diff (diff_directories) lets you copy, move or delete one item at a time. Sync does the rest in one step: it makes the other side match the active side. You see the whole plan before anything is written.

Running a sync

  1. Open the directory diff with Select → Compare Directories… and wait for the comparison to finish.
  2. Put the side you want to copy from on the active side. Tab switches sides, and the active side’s header is highlighted.
  3. Press s and pick a mode:

    Mode New and changed files Items only on the other side
    Update copied over kept
    Mirror copied over deleted
  4. The viewer now shows the plan. Identical items are hidden, and the centre column shows what will happen to each remaining item:

    Mark Meaning
    → / ← copied in that direction
    × deleted on the side the arrow points to
    · left alone

    A directory that exists on both sides has no mark of its own. Expand it to see what happens inside.

  5. Change anything you disagree with (see below), then press s again. A summary lists how many items will be copied, replaced, sent back and deleted. Choose Sync to run it.

Esc leaves the plan without doing anything, and the comparison stays open.

Changing the plan

Press Space on an item to move it to its next action:

While the plan is open, Enter still opens the file diff and edit_file still opens your merge tool (its key depends on your keymap preset — see Keymap Presets). After a merge, the comparison updates and that item’s action is worked out again. Your other changes are kept.

Tab reverses the plan’s direction and resets your changes.

What sync will not do by default

Things to know

Keys

Key Action
s Open a plan, or run the open one (dir_diff.sync)
Space Change the focused item’s action (dir_diff.cycle_sync_action)
d Show or hide the items that are the same on both sides (dir_diff.toggle_identical)
Esc Leave the plan

All of them can be rebound in KEY_BINDINGS. See Key Bindings.