1

I am using the bs-show function via the mapping:

(global-set-key (kbd "C-x C-b") 'bs-show)

However, since I also use evil-mode I find that the single key commands do not work until I switch from normal ("N") mode to emacs ("E") mode within evil each time I run the bs-show function. How can I disable evil mode within the BufferSelection menu on a permanent basis?

Setjmp
  • 27,279
  • 27
  • 74
  • 92
  • Hi, for some context the answer of Henrik is documented here: http://wikemacs.org/index.php/Evil#Enter_an_emacs_mode_in_a_given_state – Ehvince Nov 02 '15 at 14:11

2 Answers2

2

Rather than disable evil-mode altogether, perhaps you could have evil start in Emacs mode for bs-mode, like so:

(evil-set-initial-state 'bs-mode 'emacs)

Henrik
  • 982
  • 1
  • 8
  • 10
1

For what it's worth if you do want bs-mode (which I still prefer over all the new stuff) to be vim/evil like I found this person's configuration to work well:

; BS-menu
(defadvice bs-mode (before bs-mode-override-keybindings activate)
  ;; use the standard bs bindings as a base
  (evil-make-overriding-map bs-mode-map 'normal t)
  (evil-define-key 'normal bs-mode-map "h" 'evil-backward-char)
  (evil-define-key 'normal bs-mode-map "q" 'bs-abort)
  (evil-define-key 'normal bs-mode-map "j" 'bs-down)
  (evil-define-key 'normal bs-mode-map "k" 'bs-up)
  (evil-define-key 'normal bs-mode-map "l" 'evil-forward-char)
  (evil-define-key 'normal bs-mode-map "RET" 'bs-select))
Adam Gent
  • 47,843
  • 23
  • 153
  • 203
  • This looks interesting. Is there a way to block evil from entering insert mode when in bs-mode? – Setjmp May 07 '16 at 23:02