From 28eb46bd4439630bcb3ef4d65c2bff7d6fc7ffe4 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Tue, 12 Dec 2017 16:35:20 +0100 Subject: [PATCH] outline: Make -based bindings optional --- evil-collection-outline.el | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/evil-collection-outline.el b/evil-collection-outline.el index 411d046..acab4dc 100644 --- a/evil-collection-outline.el +++ b/evil-collection-outline.el @@ -30,8 +30,22 @@ (require 'evil) (require 'outline) +(defcustom evil-collection-outline-bind-tab-p t + "Enable -based bindings in Outline mode. + +Unless you have Evil bindings set up for Org mode, Org will +inherit the -based bindings from Outline. Set this option +to nil if you want to preserve the Emacs-state keys in Org +mode." + :group 'evil-collection-outline + :type 'boolean) + (defun evil-collection-outline-setup () "Set up `evil' bindings for `outline'." + (when evil-collection-outline-bind-tab-p + (evil-define-key 'motion outline-mode-map + (kbd "S-") 'outline-show-all ; Also "z r" by default + (kbd "") 'outline-toggle-children)) ; Also "z a" by default (evil-define-key 'motion outline-mode-map ;; folding ;; Evil default keys: @@ -41,8 +55,6 @@ ;; zm: Show only root notes. ;; zo: Show current node like "za". ;; zr: Show everything. - (kbd "S-") 'outline-show-all ; Also "z r" by default - (kbd "") 'outline-toggle-children ; Also "z a" by default ;; "ze" 'outline-hide-entry ;; "zE" 'outline-show-entry ;; "zl" 'outline-hide-leaves