about summary refs log tree commit diff stats
path: root/.emacs.d/lisp/init-search.el
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/lisp/init-search.el')
-rw-r--r--.emacs.d/lisp/init-search.el28
1 files changed, 28 insertions, 0 deletions
diff --git a/.emacs.d/lisp/init-search.el b/.emacs.d/lisp/init-search.el
new file mode 100644
index 0000000..40b4005
--- /dev/null
+++ b/.emacs.d/lisp/init-search.el
@@ -0,0 +1,28 @@
+;;; init-search.el --- Search Configuration File -*- lexical-binding: t -*-
+;;; Commentary:
+;;; Code:
+
+(use-package isearch
+  :ensure nil
+  :custom
+  (search-whitespace-regexp ".*\\b")
+  (isearch-lax-whitespace t)
+  (isearch-allow-scroll t)
+  ;; TODO
+  ;; (isearch-yank-on-move 'shift)
+  (isearch-yank-on-move t)
+  :bind-keymap ("C-c s" . search-map) ;; M-s clashes with paredit/smartparens bindings
+  :bind
+  ("C-*" . isearch-forward-symbol-at-point)
+  (:map search-map
+   ("M-s M-<" . isearch-beginning-of-buffer)
+   ("M-s M->" . isearch-end-of-buffer)
+   ("C-c s M-<" . isearch-beginning-of-buffer)
+   ("C-c s M->" . isearch-end-of-buffer)))
+
+(use-package isearch-dabbrev
+  :after isearch
+  :bind (:map isearch-mode-map ("M-/" . isearch-dabbrev-expand)))
+
+(provide 'init-search)
+;;; init-search.el ends here