diff options
author | Kyle Meyer <kyle@kyleam.com> | 2016-04-01 22:52:47 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2016-04-01 22:52:47 -0400 |
commit | e55f456f968393e30c9ae5371940f6ef2d6d5480 (patch) | |
tree | 3af48c9105c4f1d78380cf6457cc30ee3a272c5c | |
parent | 1265f00e2b706d8b40a14439ea50b7546f332ece (diff) | |
download | emacs.d-e55f456f968393e30c9ae5371940f6ef2d6d5480.tar.gz |
Install writeroom-mode
-rw-r--r-- | Cask | 1 | ||||
-rw-r--r-- | init.el | 15 |
2 files changed, 16 insertions, 0 deletions
@@ -52,5 +52,6 @@ (depends-on "use-package-chords") (depends-on "wgrep") (depends-on "wrap-region") +(depends-on "writeroom-mode") (depends-on "yaml-mode") (depends-on "yasnippet")
\ No newline at end of file @@ -1625,6 +1625,21 @@ :defer t :diminish pandoc-mode) +(use-package writeroom-mode + :bind ("C-c r" . writeroom-mode) + :config + (setq writeroom-restore-window-config t) + (setq writeroom-width fill-column) + + (defvar-local km/writeroom-old-truncate-lines nil) + + (defun km/writeroom-setup () + (if writeroom-mode + (setq km/writeroom-old-truncate-lines truncate-lines + truncate-lines nil) + (setq truncate-lines km/writeroom-old-truncate-lines))) + (add-hook 'writeroom-mode-hook #'km/writeroom-setup)) + ;;; Language modes |