Replies: 1 comment 2 replies
-
You can have something like this. ;; --------------------------
;; Other meow setup goes here
;; --------------------------
(defun my/meow-escape ()
"Quit INSERT or quit minibuffer or do nothing."
(interactive)
(cond
((meow-insert-mode-p)
(meow-insert-exit))
((minibufferp)
(keyboard-escape-quit))
(t)))
(meow-normal-define-key
'("s" . "C-s") ; dispatch s -> C-s
'("r" . "C-r") ; dispatch r -> C-r
'("<escape>" . my/meow-escape)) ; our customized ESC
;; We use phi-search instead of isearch, because phi-search works as a normal minibuffer command.
(straight-use-package 'phi-search) ; replace with your favorite package manager
(require 'phi-search)
(global-set-key (kbd "C-s") 'phi-search)
(global-set-key (kbd "C-r") 'phi-search-backward)
(defun my/meow-setup-extra ()
;; Don't ignore cursor shape changes in minibuffer
(delete (cons 'minibufferp 'meow--update-cursor-default)
meow-update-cursor-functions-alist)
;; Remove default minibuffer setup
(remove-hook 'minibuffer-setup-hook 'meow--minibuffer-setup)
;; Use INSERT state in minibuffer by default,
;; then later we can switch to NORMAL with ESC
(add-hook 'minibuffer-setup-hook 'meow-insert-mode))
;; Apply the patch after meow is activated
(add-hook 'meow-global-mode-hook 'my/meow-setup-extra) Personally, I don't think it's a good idea, but it should work. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is this possible? God mode has a feature like that https://github.com/emacsorphanage/god-mode#isearch-integration
Is this possible in meow as well, and if not, possible to add/fix it with a couple of lines on the existing framework?
Would be awesome to get this for isearch, M-x, etc.
Beta Was this translation helpful? Give feedback.
All reactions