13

evil-mode does not seem to bind keys in the minibuffer. Is there a way to use evil in the minibuffer? It's hard to use Vim-style keybindings everywhere BUT the minibuffer.

Dan
  • 32,584
  • 6
  • 98
  • 168
Panch93
  • 265
  • 2
  • 8
  • 1
    Implement it and submit a PR. – wasamasa Sep 28 '17 at 05:13
  • The closest thing I know to doing this is if you want to just use vim-style keybindings to edit :ex commands (ie. those that you type after typing `:`). You can do that by using the `q:` command. Even if it doesn't quite do what you want, it's super useful and well worth learning. – izkon Sep 29 '17 at 08:20

1 Answers1

9

PR #1059 implemented this. Turn it on like this:

(setq evil-want-minibuffer t)

Watch out not to become too evil! :D

Keith Pinson
  • 269
  • 1
  • 3
  • 25
Alexander Shukaev
  • 1,125
  • 10
  • 22
  • By the way, it was merged. – Alexander Shukaev Jan 06 '19 at 13:01
  • Thank you SO_MUCH for this! – Lionel Henry Dec 08 '20 at 07:32
  • Is there an update to this which allows visually seeing which evil state the minibuffer is in? (For example, `viper` does this by changing the minibuffer text color.) – mtraceur Apr 05 '23 at 16:59
  • To be clear, I mean specifically seeing the `evil` state in the minibuffer in a *terminal*. In the GUI, the cursor is visual indicator enough, but sadly in many terminals the cursor doesn't visually change between insert and command mode. (Worst case scenario I can eventually figure out and copy what `viper` is doing to change minibuffer "face" depending on it's state, and figure out how to do something similar, but if something exists out-of-the-box that would be nice.) – mtraceur Apr 05 '23 at 17:31
  • Answering my own comment (I will eventually fork this into its own question, although I do think it's very relevant here too): there is no such feature in Evil that I've been able to find, but I eventually figured out [how to implement it fairly easily](https://github.com/mentalisttraceur/home/blob/fd8900671f14709f0a693ee58e749f6a3b02eeca/.emacs#L102-L117). – mtraceur Apr 16 '23 at 16:34
  • As promised, I converted my last two comments into [it's own question and answer](https://emacs.stackexchange.com/questions/76860/how-to-get-a-minibuffer-state-indicator-for-evils-evil-want-minibuffer/), – mtraceur May 07 '23 at 22:56