From acac71a18120038c6227d6816f94e47bf96b98c3 Mon Sep 17 00:00:00 2001 From: ThanosApollo Date: Mon, 21 Nov 2022 23:50:53 +0200 Subject: Add center buffer --- .emacs.d/lisp/my-functions.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to '.emacs.d/lisp') diff --git a/.emacs.d/lisp/my-functions.el b/.emacs.d/lisp/my-functions.el index 80984d8..85eb60a 100644 --- a/.emacs.d/lisp/my-functions.el +++ b/.emacs.d/lisp/my-functions.el @@ -26,6 +26,19 @@ " )) +(defun center-buffer () + "Center buffer." + (interactive) + (setq visual-fill-column-width 100 + visual-fill-column-center-text t) + (visual-fill-column-mode 1)) + +(defun center-buffer-undo () + "Undo center-buffer." + (interactive) + (setq visual-fill-column-width 2000 + visual-fill-column-center-text nil) + (visual-fill-column-mode 1)) ;;; my-functions.el ends here -- cgit v1.2.3