hlissner / evil-snipe

2-char searching ala vim-sneak & vim-seek, for evil-mode
MIT License
341 stars 25 forks source link

Evil snipe in the minibuffer? #73

Closed Galagora closed 3 years ago

Galagora commented 3 years ago

It would be super useful if this worked while in normal state in the minibuffer. Does allowing it cause any issues?

hlissner commented 3 years ago

Unfortunately this has nothing to do with evil-snipe itself. You'd have to find a way to enable evil mode in the minibuffer. Check out evil-collection, which has managed to do that by setting evil-collection-setup-minibuffer to t.

Galagora commented 3 years ago

I already got Evil to work in the minibuffer (by binding C-<escape> to evil-normal-mode in the global map, so I don't have to press escape twice to leave). The problem appears to be that snipe specifically checks if it's in the minibuffer. Should be a quick fix, I just thought that not doing the check had previously caused issues. It's fairly easy to work around, though so it's not a huge deal:

(map! :g "C-<escape>" (cmd! (progn (evil-normal-state)
                                   (evil-snipe-local-mode +1)
                                   (evil-snipe-override-local-mode +1))))