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 "smartparens")
|
||||
(depends-on "swiper")
|
||||
(depends-on "wgrep")
|
||||
|
||||
;; Documentation --- core/core-docs.el
|
||||
(depends-on "dash-at-point")
|
||||
|
|
|
@ -261,6 +261,14 @@
|
|||
|
||||
(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
|
||||
|
|
|
@ -31,6 +31,12 @@
|
|||
(format counsel-ag-base-command (shell-quote-argument regex)))
|
||||
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)
|
||||
|
||||
(provide 'core-ivy)
|
||||
|
|
|
@ -38,10 +38,10 @@
|
|||
;; :nokill = Won't be killed when closed
|
||||
;; :modeline = Show the modeline
|
||||
(defvar doom-popup-rules
|
||||
'(("^\\*doom\\*$" :noesc :nokill :modeline)
|
||||
'(("^\\*doom\\(:scratch\\)?\\*$" :noesc :nokill :modeline)
|
||||
("^\\*doom.*\\*$" :noesc :nokill)
|
||||
(ivy-occur-grep-mode :noesc)
|
||||
(compilation-mode :noesc)
|
||||
(help-mode :noesc)
|
||||
(comint-mode :noesc :nokill)
|
||||
(eshell-mode :noesc :nokill)
|
||||
(messages-buffer-mode :nokill)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue