From 0996eb87332662c7931a20d3bdf9c2c05c1c54dd Mon Sep 17 00:00:00 2001 From: justbur Date: Wed, 22 Apr 2015 08:52:22 -0400 Subject: [PATCH] Add function and keybinding to ediff current dotfile with template --- spacemacs/funcs.el | 6 ++++++ spacemacs/keybindings.el | 1 + 2 files changed, 7 insertions(+) diff --git a/spacemacs/funcs.el b/spacemacs/funcs.el index 394bc0f10..e799f1d88 100644 --- a/spacemacs/funcs.el +++ b/spacemacs/funcs.el @@ -507,6 +507,12 @@ argument takes the kindows rotate backwards." (interactive) (find-file-existing (dotspacemacs/location))) +(defun ediff-dotfile-and-template () + "ediff the current `dotfile' with the template" + (interactive) + (ediff-files (dotspacemacs/location) + (concat dotspacemacs-template-directory ".spacemacs.template"))) + (defun find-spacemacs-file () (interactive) "Edit the `file' in the spacemacs base directory, in the current window." diff --git a/spacemacs/keybindings.el b/spacemacs/keybindings.el index 8aa76fab8..d6cf90543 100644 --- a/spacemacs/keybindings.el +++ b/spacemacs/keybindings.el @@ -105,6 +105,7 @@ Ensure that helm is required before calling FUNC." "fes" 'find-spacemacs-file "fec" 'find-contrib-file "fed" 'find-dotfile + "feD" 'ediff-dotfile-and-template "feR" 'dotspacemacs/sync-configuration-layers "fev" 'spacemacs/display-and-copy-version "fF" 'ido-find-file