summaryrefslogtreecommitdiff
path: root/.emacs.d
diff options
context:
space:
mode:
authorThanosApollo <[email protected]>2022-11-21 23:50:53 +0200
committerThanosApollo <[email protected]>2022-11-21 23:50:53 +0200
commitacac71a18120038c6227d6816f94e47bf96b98c3 (patch)
tree948f3cfe70e97c032cab9b0a8542f5c6ecd9de4e /.emacs.d
parent5464587b0ef0eb7013566666419d3983775b85c1 (diff)
Add center buffer
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/lisp/my-functions.el13
1 files changed, 13 insertions, 0 deletions
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 @@
</body>
</html>" ))
+(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