about summary refs log tree commit diff stats
path: root/.emacs.d
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2021-08-23 15:42:31 +0100
committerDavid Morgan <djm_uk@protonmail.com>2021-08-23 15:42:31 +0100
commitbc63e2e1a09c9c0bb2efec37272e6e36727aac5a (patch)
tree922e592b5a2702bef18ce111e23456681f44cef6 /.emacs.d
parente5cb95490b68ffbd0405ca86aa97330eea5851d1 (diff)
downloaddotfiles-bc63e2e1a09c9c0bb2efec37272e6e36727aac5a.tar.gz
Move isearch config to a separate file
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/init.el1
-rw-r--r--.emacs.d/lisp/init-navigation.el24
-rw-r--r--.emacs.d/lisp/init-search.el28
3 files changed, 29 insertions, 24 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 83324bd..095f6df 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -21,6 +21,7 @@
 (require 'init-compile)
 (require 'init-editor)
 (require 'init-crux)
+(require 'init-search)
 (require 'init-navigation)
 (require 'init-windows)
 (require 'init-projectile)
diff --git a/.emacs.d/lisp/init-navigation.el b/.emacs.d/lisp/init-navigation.el
index d925545..e483637 100644
--- a/.emacs.d/lisp/init-navigation.el
+++ b/.emacs.d/lisp/init-navigation.el
@@ -2,30 +2,6 @@
 ;;; Commentary:
 ;;; Code:
 
-;; (use-package ctrlf
-;;   :init
-;;   (ctrlf-mode +1)
-;;   :config
-;;   (add-to-list 'ctrlf-minibuffer-bindings '("C-M-g" . ctrlf-cancel))
-;;   (add-to-list 'ctrlf-minibuffer-bindings '("C-o o" . ctrlf-occur))
-;;   (add-to-list 'ctrlf-minibuffer-bindings '("C-o C-o" . ctrlf-occur))
-;;   :custom
-;;   (ctrlf-default-search-style 'fuzzy-regexp)
-;;   (ctrlf-alternate-search-style 'literal)
-;;   :bind
-;;   ("C-S-s" . ctrlf-forward-default)
-;;   ("C-M-g" . ctrlf-cancel) ;; always bind this in case we have left the minibuffer
-;;   ("C-*" . ctrlf-forward-symbol-at-point))
-
-(use-package isearch
-  :ensure nil
-  :custom
-  (search-whitespace-regexp ".*\\b")
-  (isearch-lax-whitespace t)
-  :bind-keymap ("C-c s" . search-map) ;; M-s clashes with paredit/smartparens bindings
-  :bind
-  ("C-*" . isearch-forward-symbol-at-point))
-
 (use-package smartscan
   :config
   (global-smartscan-mode t)
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