+*** 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)
+ (set-face-attribute 'ivy-current-match nil :background "Orange" :foreground "black")
+ :config
+ (ivy-mode)
+ (global-set-key (kbd "s-/") 'swiper)
+ (define-key swiper-map (kbd "M-r") 'swiper-query-replace)
+ (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
+
+* Dictionary
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+ (use-package bing-dict
+ :ensure t
+ :commands (bing-dict-brief)
+ :config
+ (global-set-key (kbd "s-d") 'bing-dict-brief))
+#+END_SRC
+
+* TODO Temp directory for cached/history/temp files
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+ (use-package recentf
+ :config
+ (setq recentf-save-file (concat sd-temp-directory "recentf")))
+
+ (use-package projectile
+ :config
+ (setq projectile-cache-file (concat sd-temp-directory "projectile.cache")))
+
+ (use-package ido
+ :config
+ (setq ido-save-directory-list-file (concat sd-temp-directory "ido.last")))
+
+ (use-package savehist
+ :config
+ (setq savehist-file (concat sd-temp-directory "history")))
+
+ (use-package emms
+ :config
+ (setq emms-directory (concat sd-temp-directory "emms")))
+
+ (setq auto-save-list-file-prefix (concat sd-temp-directory "auto-save-list/.saves-"))
+
+ (use-package smex
+ :config
+ (setq smex-save-file (concat sd-temp-directory "smex-items")))
+#+END_SRC
+