Add wgrep
This commit is contained in:
parent
4dc06a6e8f
commit
7038a5b66d
4 changed files with 24 additions and 9 deletions
1
Cask
1
Cask
|
@ -78,6 +78,7 @@
|
||||||
(depends-on "smart-forward")
|
(depends-on "smart-forward")
|
||||||
(depends-on "smartparens")
|
(depends-on "smartparens")
|
||||||
(depends-on "swiper")
|
(depends-on "swiper")
|
||||||
|
(depends-on "wgrep")
|
||||||
|
|
||||||
;; Documentation --- core/core-docs.el
|
;; Documentation --- core/core-docs.el
|
||||||
(depends-on "dash-at-point")
|
(depends-on "dash-at-point")
|
||||||
|
|
|
@ -261,6 +261,14 @@
|
||||||
|
|
||||||
(use-package swiper :commands (swiper swiper-all))
|
(use-package swiper :commands (swiper swiper-all))
|
||||||
|
|
||||||
|
(use-package wgrep
|
||||||
|
:commands (wgrep-setup wgrep-change-to-wgrep-mode)
|
||||||
|
:config
|
||||||
|
(def-popup! "^\\*ivy-occur.+" :align below :size 25 :select t :regexp t)
|
||||||
|
(setq wgrep-auto-save-buffer t)
|
||||||
|
(advice-add 'wgrep-abort-changes :after 'doom/popup-close)
|
||||||
|
(advice-add 'wgrep-finish-edit :after 'doom/popup-close))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Keybinding fixes
|
;; Keybinding fixes
|
||||||
|
|
|
@ -31,6 +31,12 @@
|
||||||
(format counsel-ag-base-command (shell-quote-argument regex)))
|
(format counsel-ag-base-command (shell-quote-argument regex)))
|
||||||
nil))))
|
nil))))
|
||||||
|
|
||||||
|
(add-hook! doom-popup-mode
|
||||||
|
(when (eq major-mode 'ivy-occur-grep-mode)
|
||||||
|
(ivy-wgrep-change-to-wgrep-mode)))
|
||||||
|
|
||||||
|
(define-key counsel-ag-map [backtab] 'ivy-occur))
|
||||||
|
|
||||||
(use-package counsel-projectile :after projectile)
|
(use-package counsel-projectile :after projectile)
|
||||||
|
|
||||||
(provide 'core-ivy)
|
(provide 'core-ivy)
|
||||||
|
|
|
@ -38,15 +38,15 @@
|
||||||
;; :nokill = Won't be killed when closed
|
;; :nokill = Won't be killed when closed
|
||||||
;; :modeline = Show the modeline
|
;; :modeline = Show the modeline
|
||||||
(defvar doom-popup-rules
|
(defvar doom-popup-rules
|
||||||
'(("^\\*doom\\*$" :noesc :nokill :modeline)
|
'(("^\\*doom\\(:scratch\\)?\\*$" :noesc :nokill :modeline)
|
||||||
("^\\*doom.*\\*$" :noesc :nokill)
|
("^\\*doom.*\\*$" :noesc :nokill)
|
||||||
(compilation-mode :noesc)
|
(ivy-occur-grep-mode :noesc)
|
||||||
(help-mode :noesc)
|
(compilation-mode :noesc)
|
||||||
(comint-mode :noesc :nokill)
|
(comint-mode :noesc :nokill)
|
||||||
(eshell-mode :noesc :nokill)
|
(eshell-mode :noesc :nokill)
|
||||||
(messages-buffer-mode :nokill)
|
(messages-buffer-mode :nokill)
|
||||||
(esup-mode :noesc)
|
(esup-mode :noesc)
|
||||||
(tabulated-list-mode :noesc)))
|
(tabulated-list-mode :noesc)))
|
||||||
|
|
||||||
;; There is no shackle-popup hook, so I hacked one in
|
;; There is no shackle-popup hook, so I hacked one in
|
||||||
(advice-add 'shackle-display-buffer :around 'doom*popup-init)
|
(advice-add 'shackle-display-buffer :around 'doom*popup-init)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue