summaryrefslogtreecommitdiff
path: root/search-conf.el
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2021-01-20 11:08:00 +0800
committerJSDurand <mmemmew@gmail.com>2021-01-20 17:10:01 +0800
commit53db9402916822e673b3b49fcba26537e2416b59 (patch)
tree7f999ef9f995871d53051b487cd347876c5e43ce /search-conf.el
parent4d28d444af32ddf4af5900786473fadacc43e4b1 (diff)
More QoL changes
* basic.el (auto-fill-function): Hide auto-fill-function from the mode line. (auto-revert-mode): Hide auto-revert-mode from the mode line. * common.el (durand-hide-minor-mode): Use a simple macro to facilitate hiding. * elisp.el (eldoc-mode): Use a macro to hide instead. * eww-conf.el (eww-bookmarks-directory): Start Configuring EWW. * init.el ("durand-simple"): My simple utilities. ("search-conf.el"): Configuring searching. * search-conf.el (search-whitespace-regexp): White space as wild cards (isearch-lax-whitespace): as above (isearch-lazy-count): Count the matches (isearch-allow-scroll): Scrolling while searching (durand-search-replace-symbol): For quick refactoring * text-conf.el (assq): Hide using the macro instead.
Diffstat (limited to 'search-conf.el')
-rw-r--r--search-conf.el25
1 files changed, 25 insertions, 0 deletions
diff --git a/search-conf.el b/search-conf.el
new file mode 100644
index 0000000..bb8297b
--- /dev/null
+++ b/search-conf.el
@@ -0,0 +1,25 @@
+;;; search-conf.el --- My configurations for searching -*- lexical-binding: t; -*-
+
+(setq search-whitespace-regexp ".*?")
+(setq isearch-lax-whitespace t)
+(setq isearch-lazy-count t)
+(setq isearch-allow-scroll 'unlimited)
+
+;;;###autoload
+(defun durand-search-replace-symbol (&optional arg)
+ "Search the symbol at point and query-replace.
+
+If ARG is negative, replace backwards."
+ (interactive "p")
+ (isearch-forward-symbol-at-point arg)
+ (isearch-query-replace-regexp (cond ((< arg 0) arg))))
+
+(define-key global-map (vector ?\M-s ?%) #'durand-search-replace-symbol)
+
+
+
+
+
+(provide 'search-conf)
+
+;;; search-conf.el ends here