Skip to content

Instantly share code, notes, and snippets.

@etherald
Created December 22, 2017 19:27
Show Gist options
  • Save etherald/9fb1c1c072a2a65a9f63e904fefdf807 to your computer and use it in GitHub Desktop.
Save etherald/9fb1c1c072a2a65a9f63e904fefdf807 to your computer and use it in GitHub Desktop.
;; reader-mode.el
;; [Fri Dec 22 19:24:09 UTC 2017]
;; displays selected buffer continuously flowed
;; into reader-mode-column-count windows side by side
;; in read-only mode
(defvar reader-mode-column-count 4)
(defun reader-mode (buf)
(interactive "bRead buffer: ")
(unless (eq (current-buffer) buf)
(switch-to-buffer buf))
(delete-other-windows)
(view-mode)
(dotimes (count (- reader-mode-column-count 1))
(split-window-right))
(balance-windows)
(follow-mode))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment