aboutsummaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d
diff options
context:
space:
mode:
authorGravatar Tom Willemse2016-10-14 01:16:24 +0200
committerGravatar Tom Willemse2016-10-14 01:16:24 +0200
commit5d64560cec9f876bbc07679ebffd61e775368f4a (patch)
treea6888ce32d008579bced3877496b2ebe74cb2ee8 /emacs/.emacs.d
parent4813d15f0e71aa45290631667715f072426ba78f (diff)
downloadnew-dotfiles-5d64560cec9f876bbc07679ebffd61e775368f4a.tar.gz
new-dotfiles-5d64560cec9f876bbc07679ebffd61e775368f4a.zip
Add Ediff configuration
Diffstat (limited to 'emacs/.emacs.d')
-rw-r--r--emacs/.emacs.d/init.org6
-rw-r--r--emacs/.emacs.d/init/ediff-init.org37
2 files changed, 43 insertions, 0 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index dcbb14b..4e79fb0 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -942,6 +942,12 @@ To start off, first I need to enable lexical binding.
(with-eval-after-load 'magit (load "magit-init"))
#+END_SRC
+ - [[file:init/ediff-init.org][Ediff]] :: A reall diff application.
+
+ #+BEGIN_SRC emacs-lisp
+ (with-eval-after-load 'ediff (load "ediff-init"))
+ #+END_SRC
+
** Gnus
Gnus is one of the most extensible Email programs on the
diff --git a/emacs/.emacs.d/init/ediff-init.org b/emacs/.emacs.d/init/ediff-init.org
new file mode 100644
index 0000000..4d6df76
--- /dev/null
+++ b/emacs/.emacs.d/init/ediff-init.org
@@ -0,0 +1,37 @@
+#+TITLE: Ediff
+
+Don't use a special frame for the ediff control buffer.
+
+#+BEGIN_SRC emacs-lisp
+ (setq ediff-window-setup-function 'ediff-setup-windows-plain)
+#+END_SRC
+
+Show the different buffers next to eachother instead of underneath
+eachother.
+
+#+BEGIN_SRC emacs-lisp
+ (setq ediff-split-window-function 'split-window-horizontally)
+#+END_SRC
+
+Don't show whitespace changes in ediff buffers.
+
+#+BEGIN_SRC emacs-lisp
+ (setq ediff-diff-options "-w")
+#+END_SRC
+
+Show ediff in a fullscreen frame.
+
+#+BEGIN_SRC emacs-lisp
+ (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)
+#+END_SRC