branch: externals/olivetti commit 4095b761e12352a0862e6fadbc56483e7c756f21 Merge: ef3d85e bd672e5 Author: Paul Rankin <he...@paulwrankin.com> Commit: Paul Rankin <he...@paulwrankin.com>
Merge pull request #10 from larstvei/master Make it easier to adjust olivetti-body-width --- olivetti.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/olivetti.el b/olivetti.el index 809073b..e79f955 100644 --- a/olivetti.el +++ b/olivetti.el @@ -253,7 +253,11 @@ If prefixed with ARG, incrementally decrease." (+ olivetti-body-width (* 0.01 p)))))) (setq olivetti-body-width (olivetti-safe-width n))) (olivetti-set-environment) - (message "Text body width set to %s" olivetti-body-width)) + (message "Text body width set to %s" olivetti-body-width) + (set-temporary-overlay-map + (let ((map (make-sparse-keymap))) + (define-key map "]" 'olivetti-expand) + (define-key map "[" 'olivetti-shrink) map))) (defun olivetti-shrink (&optional arg) "incrementally decrease the value of `olivetti-body-width'.