Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use the default-input-method when doing an incremental search in EVIL?

Before loading EVIL for vim emulation in emacs, I have the following in my .emacs file:

(activate-input-method "english-dvorak")
(setq default-input-method "english-dvorak")

However, when I type / to start an incremental search with EVIL, the default input method is not used. Why is this? How can I make it so EVIL uses default-input-method whenever I am typing letters on screen?

I was able to hack in proper support for the f and t commands by mapping the qwerty characters to dvorak before the rest of the those function's code executed, but I still haven't been able to get my searches with / to use dvorak.

like image 863
Gordon Gustafson Avatar asked Jan 28 '26 10:01

Gordon Gustafson


1 Answers

I've tested the following configuration on my PC and it seem to make Dvorak to be on everywhere in Emacs:

;; Main setup for  all the buffers
(defadvice switch-to-buffer (after activate-input-method activate)
  (activate-input-method "english-dvorak"))

;; Sets up Dvorak for the minibuffer
(add-hook 'minibuffer-setup-hook (lambda () (set-input-method "english-dvorak")))

;; Sets up Dvorak for *scratch* buffer (used Qwerty on my PC otherwise)
(save-excursion
  (set-buffer (get-buffer "*scratch*"))
  (set-input-method "english-dvorak"))
like image 118
Alexey Avatar answered Jan 30 '26 05:01

Alexey