From b4316cb3b8e64cda22938db82876e3d5bd03addb Mon Sep 17 00:00:00 2001 From: Peng Li Date: Wed, 20 Jul 2016 22:11:30 +0800 Subject: [PATCH] emacs - change swiper --- emacs.d/config.org | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/emacs.d/config.org b/emacs.d/config.org index 690bbe6..2b5d441 100644 --- a/emacs.d/config.org +++ b/emacs.d/config.org @@ -783,12 +783,12 @@ Some global bindings on =Super=, on Mac, it is =Command= ** Search Replace and highlight *** swiper #+BEGIN_SRC emacs-lisp :tangle yes :results silent - (use-package swiper - :ensure t) + ;; (use-package swiper + ;; :ensure t) - (ivy-mode 1) - (setq ivy-use-virtual-buffers t) - (global-set-key (kbd "s-/") 'swiper) + ;; (ivy-mode 1) + ;; (setq ivy-use-virtual-buffers t) + ;; (global-set-key (kbd "s-/") 'swiper) (use-package counsel :ensure t @@ -811,10 +811,13 @@ Some global bindings on =Super=, on Mac, it is =Command= ;; (global-set-key (kbd "C-S-o") 'counsel-rhythmbox) ;; ;; (define-key read-expression-map (kbd "C-r") 'counsel-expression-history) - (set-face-attribute - 'ivy-current-match nil - :background "Orange" - :foreground "black") + ;; (set-face-attribute + ;; 'ivy-current-match nil + ;; :background "Orange" + ;; :foreground "black") + + ;; ivy-resume + ;; (define-key swiper-map (kbd "M-%") 'swiper-aa-replace) #+END_SRC *** =M-s= prefix @@ -2401,6 +2404,22 @@ Occur search key bindings (use-package moccur-edit)) #+END_SRC +*** Swiper +#+BEGIN_SRC emacs-lisp :tangle yes :results silent + (use-package swiper + :ensure t + :init + (setq ivy-use-virtual-buffers t) + :config + (ivy-mode) + (global-set-key (kbd "s-/") 'swiper) + (define-key swiper-map (kbd "M-r") 'swiper-query-replace)) + + (set-face-attribute + 'ivy-current-match nil + :background "Orange" + :foreground "black") +#+END_SRC * test #+BEGIN_SRC ditaa :file temp/hello-world.png :cmdline -r +--------------+ -- 2.11.0