+** Search Replace and highlight
+*** Occur
+Occur search key bindings
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+ (add-hook 'occur-hook (lambda ()
+ (switch-to-buffer-other-window "*Occur*")
+ (define-key occur-mode-map (kbd "C-o") nil)))
+ ;; auto select occur window
+
+ (define-key occur-mode-map (kbd "C-n")
+ (lambda ()
+ (interactive)
+ (occur-next)
+ (occur-mode-goto-occurrence-other-window)
+ (recenter)
+ (other-window 1)))
+
+ (define-key occur-mode-map (kbd "C-p")
+ (lambda ()
+ (interactive)
+ (occur-prev)
+ (occur-mode-goto-occurrence-other-window)
+ (recenter)
+ (other-window 1)))
+
+ (use-package color-moccur
+ :ensure t
+ :commands (isearch-moccur isearch-all)
+ :init
+ (setq isearch-lazy-highlight t)
+ :config
+ (use-package moccur-edit))
+#+END_SRC
+
+*** swiper
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+ (use-package swiper
+ :ensure t)
+
+ (ivy-mode 1)
+ (setq ivy-use-virtual-buffers t)
+ (global-set-key (kbd "s-/") 'swiper)
+
+ (use-package counsel
+ :ensure t
+ :defer t)
+ ;;*
+ ;; (global-set-key "\C-s" 'swiper)
+ ;; (global-set-key (kbd "C-c C-r") 'ivy-resume)
+ ;; (global-set-key (kbd "<f6>") 'ivy-resume)
+ (global-set-key (kbd "M-x") 'counsel-M-x)
+ ;; ;; (global-set-key (kbd "C-x C-f") 'counsel-find-file)
+ (global-set-key (kbd "C-h f") 'counsel-describe-function)
+ (global-set-key (kbd "C-h v") 'counsel-describe-variable)
+ ;; (global-set-key (kbd "<f1> l") 'counsel-load-library)
+ ;; (global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol)
+ ;; (global-set-key (kbd "<f2> u") 'counsel-unicode-char)
+ ;; (global-set-key (kbd "C-c g") 'counsel-git)
+ ;; (global-set-key (kbd "C-c j") 'counsel-git-grep)
+ ;; (global-set-key (kbd "C-c k") 'counsel-ag)
+ ;; (global-set-key (kbd "C-x l") 'counsel-locate)
+ ;; (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")
+#+END_SRC
+
+*** =M-s= prefix