From f4da21900563f4ac1abf79f3fe73eaf1edcd633d Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Tue, 1 Dec 2015 10:23:36 -0500 Subject: [PATCH] Remove default key binding and inform user to explicity define one. --- README.md | 13 +++++++++---- evil-lisp-state.el | 16 ++++++++-------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 816aa31..2605fa3 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ both `evil`, `bind-map` and `smartparens` to be installed. ## Principle To execute a command while in normal state, a leader key is used. -By default, the leader for each command is `SPC l`. +The leader has to be defined with the function `evil-lisp-state-leader`. By default any command when executed sets the current state to `lisp state`. Examples: @@ -110,6 +110,14 @@ Key Binding | Function ## Configuration +No default binding comes with the package, you have to explicitly +bind the lisp state to a key with the function `evil-lisp-state-leader` +For instance: + +```elisp +(evil-lisp-state-leader ", l") +``` + Key bindings are set only for `emacs-lisp-mode` by default. It is possible to add major modes with the variable `evil-lisp-state-major-modes'. @@ -117,9 +125,6 @@ It is also possible to define the key bindings globally by setting `evil-lisp-state-global` to t. In this case `evil-lisp-state-major-modes' has no effect. -The leader key is `SPC l` by default, it is possible to change it with the -function `evil-lisp-state-leader`. - If you don't want commands to enter in `lisp state` by default set the variable `evil-lisp-state-enter-lisp-state-on-command` to nil. Then use the . to enter manually in `lisp state` diff --git a/evil-lisp-state.el b/evil-lisp-state.el index 485d05d..d3db878 100644 --- a/evil-lisp-state.el +++ b/evil-lisp-state.el @@ -33,15 +33,15 @@ ;; ---------- ;; To execute a command while in normal state, a leader is used. -;; By default, the leader for each command is `SPC l`. +;; The leader has to be defined with the function `evil-lisp-state-leader'. ;; By default, any command when executed sets the current state to ;; `lisp state`. - -;; By example, to slurp three times while in normal state: +;; +;; For example, to slurp three times while in normal state: ;; 3 s ;; Or to wrap a symbol in parenthesis then slurping two times: ;; w 2 s - +;; ;; Key Binding | Function ;; -------------|------------------------------------------------------------ ;; `leader .' | switch to `lisp state' @@ -92,6 +92,10 @@ ;; Configuration: ;; -------------- +;; No default binding comes with the package, you have to explicitly +;; bind the lisp state to a key with the function `evil-lisp-state-leader' +;; For instance: `(evil-lisp-state-leader ", l")' + ;; Key bindings are set only for `emacs-lisp-mode' by default. ;; It is possible to add major modes with the variable ;; `evil-lisp-state-major-modes'. @@ -100,9 +104,6 @@ ;; setting `evil-lisp-state-global' to t. In this case ;; `evil-lisp-state-major-modes' has no effect. -;; The leader key is `SPC l' by default, it is possible to -;; change it with the function `evil-lisp-state-leader'. - ;; If you don't want commands to enter in `lisp state' by default ;; set the variable `evil-lisp-state-enter-lisp-state-on-command' ;; to nil. Then use the `.' to enter manually in `lisp state' @@ -178,7 +179,6 @@ If `evil-lisp-state-global' is non nil then this variable has no effect." :evil-keys (,leader) :evil-states (normal) :major-modes ,evil-lisp-state-major-modes))) -(evil-lisp-state-leader "SPC l") ;; escape (define-key evil-lisp-state-map [escape] 'evil-normal-state)