Skip to content

Instantly share code, notes, and snippets.

@EricCrosson
Created December 19, 2016 18:28
Show Gist options
  • Save EricCrosson/e2e01335cfdcc49e758ca984f4440e8a to your computer and use it in GitHub Desktop.
Save EricCrosson/e2e01335cfdcc49e758ca984f4440e8a to your computer and use it in GitHub Desktop.
(defun follow-this-buffer ()
"Open the current buffer in `follow-mode`. Additionally, open
as many vertical windows as possible with 80 columns in each."
(interactive)
(delete-other-windows)
(while (< 80 (window-width))
(split-window-horizontally)
(balance-windows))
(delete-window)
(balance-windows)
(follow-mode t))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment