From 0aa80d252219f26c270ac6409d9f57716a26c594 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Fri, 17 Jul 2020 18:52:00 +0200 Subject: [PATCH] Add indent-buffer --- .emacs.d/config.org | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.emacs.d/config.org b/.emacs.d/config.org index 9871989..9daaf17 100644 --- a/.emacs.d/config.org +++ b/.emacs.d/config.org @@ -678,6 +678,12 @@ Functions that only use built-in Emacs functionality. (when symbol (describe-symbol symbol)))) + (defun dot/indent-buffer () + "Indent each nonblank line in the buffer." + (interactive) + (save-excursion + (indent-region (point-min) (point-max) nil))) + (defun split-follow-horizontally () "Split and follow window." (interactive) @@ -1066,6 +1072,7 @@ General.el ~leader key binds. ;; Reformat region "r" '(:ignore t :which-key "region") + "r b" '(dot/indent-buffer :which-key "Indent buffer") "r r" '(indent-region :which-key "Indent region") ;; Search