+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+
+ ;; (defhydra sd/search-highlight (:color red :columns nil)
+ ;; "search"
+ ;; ("M-s" . isearch-forward-regexp "search-forward" :exit t)
+ ;; ("s" . isearch-forward-regexp "search-forward" :exit t)
+ ;; ("r" . isearch-backward-regexp "search-backward" :exit t)
+ ;; )
+
+ ;; (setq-default indicate-empty-lines t)
+#+END_SRC
+
+*** Occur
+Occur search key bindings
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+ (defun sd/occur-keys ()
+ "My key bindings in occur-mode"
+ (interactive)
+ (switch-to-buffer-other-window "*Occur*")
+ (define-key occur-mode-map (kbd "C-o") nil)
+ (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))))
+
+ (add-hook 'occur-hook #'sd/occur-keys)
+
+ (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
+stolen from [[https://github.com/mariolong/emacs.d/blob/f6a061594ef1b5d1f4750e9dad9dc97d6e122840/emacs-init.org][here]]
+#+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")
+
+ (eval-after-load 'swiper
+ '(progn
+ (define-key swiper-map (kbd "C-.")
+ (lambda ()
+ (interactive)
+ (insert (format "%s" (with-ivy-window (thing-at-point 'word))))))
+ (define-key swiper-map (kbd "M-.")
+ (lambda ()
+ (interactive)
+ (insert (format "%s" (with-ivy-window (thing-at-point 'symbol))))))
+ ))
+#+END_SRC
+
+* test
+#+BEGIN_SRC ditaa :file temp/hello-world.png :cmdline -r
++--------------+
+| |
+| Hello World! |
+| |
++--------------+
+#+END_SRC
+
+#+RESULTS:
+[[file:temp/hello-world.png]]
+
+
+* =C-u C-h a= search funtions
+=apropos-command=