Deadgrep: Add experimental support for editing
Worth keeping track of https://github.com/Wilfred/deadgrep/issues/12 in the future in case a better (wgrep?) approach works out.
This commit is contained in:
parent
afe6aeb479
commit
9168213b99
|
@ -30,11 +30,15 @@
|
||||||
(require 'evil-collection)
|
(require 'evil-collection)
|
||||||
(require 'deadgrep nil t)
|
(require 'deadgrep nil t)
|
||||||
|
|
||||||
(defconst evil-collection-deadgrep-maps '(deadgrep-mode-map))
|
(defconst evil-collection-deadgrep-maps '(deadgrep-edit-mode-map
|
||||||
|
deadgrep-mode-map))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun evil-collection-deadgrep-setup ()
|
(defun evil-collection-deadgrep-setup ()
|
||||||
"Set up `evil' bindings for deadgrep.."
|
"Set up `evil' bindings for deadgrep.."
|
||||||
|
(evil-collection-define-key 'normal 'deadgrep-edit-mode-map
|
||||||
|
(kbd "RET") 'deadgrep-visit-result
|
||||||
|
(kbd "<escape>") 'deadgrep-mode)
|
||||||
(evil-collection-define-key 'normal 'deadgrep-mode-map
|
(evil-collection-define-key 'normal 'deadgrep-mode-map
|
||||||
(kbd "RET") 'deadgrep-visit-result
|
(kbd "RET") 'deadgrep-visit-result
|
||||||
(kbd "<S-return>") 'deadgrep-visit-result-other-window
|
(kbd "<S-return>") 'deadgrep-visit-result-other-window
|
||||||
|
@ -44,6 +48,8 @@
|
||||||
(kbd "C-k") 'deadgrep-backward
|
(kbd "C-k") 'deadgrep-backward
|
||||||
(kbd "TAB") 'deadgrep-toggle-file-results
|
(kbd "TAB") 'deadgrep-toggle-file-results
|
||||||
|
|
||||||
|
"i" 'deadgrep-edit-mode
|
||||||
|
|
||||||
;; FIXME: Maybe we should bind this to something?
|
;; FIXME: Maybe we should bind this to something?
|
||||||
;; (define-key map (kbd "C-c C-k") #'deadgrep-kill-process)
|
;; (define-key map (kbd "C-c C-k") #'deadgrep-kill-process)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue