Skip to content

Instantly share code, notes, and snippets.

@Arahnoid
Last active December 18, 2020 04:44
Show Gist options
  • Save Arahnoid/5495e3b23752d42b7b53efdaf1e388ae to your computer and use it in GitHub Desktop.
Save Arahnoid/5495e3b23752d42b7b53efdaf1e388ae to your computer and use it in GitHub Desktop.
A simple function and key binding for Doom Emacs allows to toggle on/of emphasis
(defun my-toggle-emphasis ()
"Toggle emphasis in buffer"
(interactive)
(if (eq org-hide-emphasis-markers t)
(progn
(setq org-hide-emphasis-markers nil)
(font-lock-fontify-buffer)
(message "Emphasis toggled OFF"))
(progn
(setq org-hide-emphasis-markers t)
(font-lock-fontify-buffer)
(message "Emphasis toggled ON"))))
(map! :leader :desc "Emphasis" :m "t e" #'ig/toggle-emphasis)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment