dotfiles/emacs/.emacs.d/init/ediff-init.org

1 KiB

Ediff

  (require 'ediff)

Don't use a special frame for the ediff control buffer.

  (setq ediff-window-setup-function 'ediff-setup-windows-plain)

Show the different buffers next to eachother instead of underneath eachother.

  (setq ediff-split-window-function 'split-window-horizontally)

Don't show whitespace changes in ediff buffers.

  (setq ediff-diff-options "-w")

Show ediff in a fullscreen frame.

  (defun oni:turn-on-fullscreen ()
    (unless (memq (frame-parameter nil 'fullscreen)
                  '(fullscreen fullboth))
      (set-frame-parameter nil 'fullscreen 'fullboth)))

  (defun oni:turn-off-fullscreen ()
    (when (memq (frame-parameter nil 'fullscreen)
                '(fullscreen fullboth))
      (set-frame-parameter nil 'fullscreen nil)))

  (add-hook 'ediff-mode-hook 'oni:turn-on-fullscreen)
  (add-hook 'ediff-cleanup-hook 'oni:turn-off-fullscreen)