From 77c6924a6815c54a66bb228b5b47c49f9fca8feb Mon Sep 17 00:00:00 2001 From: Raul Benencia Date: Sun, 2 Oct 2022 14:45:36 -0700 Subject: emacs: logos mode --- .emacs | 1 + .emacs.local.d/modes/logos.el | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .emacs.local.d/modes/logos.el diff --git a/.emacs b/.emacs index d598c5d..b0fa66e 100644 --- a/.emacs +++ b/.emacs @@ -17,6 +17,7 @@ (load-file "~/.emacs.local.d/modes/imenu.el") (load-file "~/.emacs.local.d/modes/ivy.el") (load-file "~/.emacs.local.d/modes/latex.el") +(load-file "~/.emacs.local.d/modes/logos.el") (load-file "~/.emacs.local.d/modes/mail-mode.el") (load-file "~/.emacs.local.d/modes/markdown.el") (load-file "~/.emacs.local.d/modes/magit.el") diff --git a/.emacs.local.d/modes/logos.el b/.emacs.local.d/modes/logos.el new file mode 100644 index 0000000..2484125 --- /dev/null +++ b/.emacs.local.d/modes/logos.el @@ -0,0 +1,25 @@ +(require 'logos) + +;; If you want to use outlines instead of page breaks (the ^L) +(setq logos-outlines-are-pages t) +(setq logos-outline-regexp-alist + `((emacs-lisp-mode . "^;;;+ ") + (org-mode . "^\\*+ +") + (markdown-mode . "^\\#+ +") + (t . ,(or outline-regexp logos--page-delimiter)))) + +;; These apply when `logos-focus-mode' is enabled. Their value is +;; buffer-local. +(setq-default logos-hide-mode-line t + logos-hide-buffer-boundaries t + logos-hide-fringe t + logos-variable-pitch nil + logos-buffer-read-only nil + logos-scroll-lock nil + logos-olivetti t) + +(let ((map global-map)) + (define-key map [remap narrow-to-region] #'logos-narrow-dwim) + (define-key map [remap forward-page] #'logos-forward-page-dwim) + (define-key map [remap backward-page] #'logos-backward-page-dwim) +) -- cgit v1.2.3