|
|
@@ -450,13 +450,19 @@ Otherwize hook it." |
|
|
|
|
|
|
|
;; (global-set-key (kbd "C-s") 'isearch-forward-regexp) |
|
|
|
;; (global-set-key (kbd "C-r") 'isearch-backward-regexp) |
|
|
|
(set-variable 'search-default-mode t) |
|
|
|
;; TODO: Do not depend on ivy function |
|
|
|
;; (set-variable 'search-default-mode |
|
|
|
;; (lambda (str lax) |
|
|
|
;; (ivy--regex-fuzzy (replace-regexp-in-string (rx (one-or-more whitespace)) |
|
|
|
;; "" |
|
|
|
;; str)))) |
|
|
|
(if (eval-and-compile (require 'prescient nil t)) |
|
|
|
(set-variable 'search-default-mode |
|
|
|
(lambda (orig lax) |
|
|
|
(prescient-fuzzy-regexp orig))) |
|
|
|
(set-variable 'search-default-mode t)) |
|
|
|
;; (set-variable 'search-whitespace-regexp ".*?") |
|
|
|
;; (set-variable 'isearch-regexp-lax-whitespace t) |
|
|
|
;; (replace-regexp-in-string "\n" "" (prescient-fuzzy-regexp "abc")) |
|
|
|
;; (string-match-p (prescient-fuzzy-regexp "abc") "aaa\nbc") |
|
|
|
;; (isearch-symbol-regexp "abc def" nil) |
|
|
|
;; (isearch-symbol-regexp "abc def" t) |
|
|
|
;; (word-search-regexp "abc def" nil) |
|
|
|
;; (word-search-regexp "abc def" t) |
|
|
|
|
|
|
|
(when (fboundp 'undo-fu-only-undo) |
|
|
|
(global-set-key (kbd "C-_") 'undo-fu-only-undo)) |
|
|
@@ -2581,7 +2587,7 @@ condition to choose COMMAND when evaluated.") |
|
|
|
;; ripgrep |
|
|
|
("rg" |
|
|
|
(executable-find "rg") |
|
|
|
"rg -nH --no-heading --hidden --glob '!.git/' --smart-case -M 1280 ") |
|
|
|
"rg -nH --no-heading --hidden --no-ignore-parent --glob '!.git/' --smart-case -M 1280 ") |
|
|
|
|
|
|
|
;; git grep |
|
|
|
("gitgrep" |
|
|
|