Compare commits

...

4 Commits

Author SHA1 Message Date
7f541be0ef Formatting 2024-09-24 18:31:29 +02:00
9291e0e4b6 Setup for org-present 2024-09-24 17:30:14 +02:00
dbbfdcc67f Add center-content-mode 2024-09-24 08:28:24 +02:00
82790351a1 Hook is implied in :hook 2024-09-22 10:39:38 +02:00
2 changed files with 66 additions and 3 deletions

View File

@ -278,7 +278,8 @@
(setq load-path (setq load-path
(append (append
(let ((load-path (copy-sequence load-path))) (let ((load-path (copy-sequence load-path)))
(normal-top-level-add-subdirs-to-load-path)) load-path)))) (normal-top-level-add-subdirs-to-load-path))
load-path))))
#+end_src #+end_src
@ -538,6 +539,18 @@
#+end_src #+end_src
** Center content mode
[[https://git.larstvei.no/larstvei/center-content-mode][center-content-mode]] is a small, homegrown, minor mode for centering the
buffer content both horizontally and vertically.
#+begin_src emacs-lisp
(use-package center-content-mode
:ensure nil)
#+end_src
* Mac OS X * Mac OS X
I run this configuration mostly on macOS, so we need a couple of settings to I run this configuration mostly on macOS, so we need a couple of settings to
@ -1020,6 +1033,55 @@
#+end_src #+end_src
** Org present
[[https://github.com/rlister/org-present][org-present-mode]] provides a minimalistic slide view of an org-mode buffer.
Together with =org-modern=, =center-content-mode=, =focus-mode= and a few other
customizations, we get pretty decent looking slides!
#+begin_src emacs-lisp
(use-package org-present
:after center-content-mode
:hook ((org-present-mode
. (lambda ()
(jinx-mode -1)
(org-modern-mode -1)
(set (make-local-variable 'org-modern-hide-stars) t)
(setq cursor-type nil)
(org-modern-mode 1)
(org-present-big)
(org-display-inline-images)
(focus-mode 1)
(center-content-mode 1)))
(org-present-mode-quit
. (lambda ()
(jinx-mode 1)
(org-modern-mode -1)
(setq org-modern-hide-stars (default-value 'org-modern-hide-stars))
(setq cursor-type (default-value 'cursor-type))
(org-modern-mode 1)
(focus-mode -1)
(center-content-mode -1))))
:config
(defun org-present-next-item ()
(interactive)
(unless (re-search-forward "^+" nil t)
(org-present-next)))
(defun org-present-prev-item ()
(interactive)
(unless (re-search-backward "^+" nil t)
(org-present-prev)))
:bind (:map org-present-mode-keymap
("<next>" . org-present-next-item)
("C-<right>" . org-present-next-item)
("<prior>" . org-present-prev-item)
("C-<left>" . org-present-prev-item)))
#+end_src
* Markdown * Markdown
Markdown is pretty nice, especially when collaborating with others (as most Markdown is pretty nice, especially when collaborating with others (as most
@ -1097,8 +1159,8 @@
;; Multiple cursors for Emacs ;; Multiple cursors for Emacs
(use-package multiple-cursors (use-package multiple-cursors
:defer t :defer t
:hook ((multiple-cursors-mode-enabled-hook . (lambda () (corfu-mode -1))) :hook ((multiple-cursors-mode-enabled . (lambda () (corfu-mode -1)))
(multiple-cursors-mode-disabled-hook . (lambda () (corfu-mode 1)))) (multiple-cursors-mode-disabled . (lambda () (corfu-mode 1))))
:bind (:map custom-bindings-map :bind (:map custom-bindings-map
("C-c e" . mc/edit-lines) ("C-c e" . mc/edit-lines)
("C-c a" . mc/mark-all-like-this) ("C-c a" . mc/mark-all-like-this)

@ -0,0 +1 @@
Subproject commit 6527a1c8148c69b730d8d5517ee48fede5720f21