From 512f71c9270b723070cf17e2e9a243cef28fab19 Mon Sep 17 00:00:00 2001 From: 10sr <8.slashes@gmail.com> Date: Mon, 2 Dec 2019 14:25:26 +0900 Subject: [PATCH] Separate ivy configs --- emacs.el | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/emacs.el b/emacs.el index 2a84337..54baf89 100644 --- a/emacs.el +++ b/emacs.el @@ -2416,19 +2416,20 @@ Any output will be written to current buffer." ;; ivy +(defvar ivy-re-builders-alist) +(set-variable 'ivy-re-builders-alist + '((t . (lambda (s) + ;; Ignore whitespace + (ivy--regex-fuzzy (replace-regexp-in-string (rx space) + "" + s)))))) + +(with-eval-after-load 'ivy + (defvar ivy-minibuffer-map) + (define-key ivy-minibuffer-map (kbd "C-u") + (lambda () (interactive) (delete-region (point-at-bol) (point))))) + (when (fboundp 'counsel-M-x) - (defvar ivy-re-builders-alist) - (set-variable 'ivy-re-builders-alist - '((t . (lambda (s) - ;; Ignore whitespace - (ivy--regex-fuzzy (replace-regexp-in-string (rx space) - "" - s)))))) - - (with-eval-after-load 'ivy - (defvar ivy-minibuffer-map) - (define-key ivy-minibuffer-map (kbd "C-u") - (lambda () (interactive) (delete-region (point-at-bol) (point))))) (define-key esc-map "x" 'counsel-M-x) ;; (counsel-mode 1) ;; counsel-fzf executes fzf -f QUERY for each input