From 033b38ce2d3a17ba56319898425ebfbf65d06e88 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 25 Jul 2024 02:47:45 +0100 Subject: (Emacs/config)+diff-mode --- Emacs/.config/emacs/config.org | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'Emacs/.config/emacs') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 5ab8f6d..fe4aa9e 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -1466,6 +1466,26 @@ easy to guess what text I'd use. (insert-leader "p" #'lorem-ipsum-insert-paragraphs)) #+end_src +** diff mode +Oh diffs; the way of the ancient ones. Nowadays we use our newfangled +"pull requests" and "cool web interfaces" to handle change management +in our code repositories, but the old school projects use patches to +make code changes. I actually somewhat like patches, if only for +their simplicity in concept. + +[[https://git.aryadevchavali.com/dwm][dwm]] uses patches for adding +new features and Emacs has great functionality to work with patches +effectively. Here I configure ~diff-mode~, which provides most of this +cool stuff, to be a bit more ergonomic with ~evil~. +#+begin_src emacs-lisp +(use-package diff-mode + :general + (nmmap + :keymaps 'diff-mode-map + "}" #'diff-hunk-next + "{" #'diff-hunk-prev + "RET" #'diff-goto-source)) +#+end_src * Applications Emacs is basically an operating system whose primary datatype is text. Applications are interfaces/environments which serve a variety of -- cgit v1.2.3-13-gbd6f