From a628d82b0f97ec09d033c583cffd25a224eab6d9 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Wed, 26 Feb 2020 10:06:23 -0500 Subject: [PATCH] Reformatting --- emacs/init.org | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/emacs/init.org b/emacs/init.org index a3f1bb7..dd28be6 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -4191,9 +4191,6 @@ An Emacs interface to MPD, the Music Player Daemon * Ivy An alternative minibuffer completion framework: #+BEGIN_SRC emacs-lisp - (defun counsel-ibuffer-kill-buffer (x) - (kill-buffer (cdr x))) - (use-package counsel :defer 0 :config @@ -4215,6 +4212,7 @@ An alternative minibuffer completion framework: (leader-def-key "ff" #'counsel-find-file) (leader-def-key "oc" #'counsel-org-capture) (leader-def-key "bb" #'counsel-ibuffer) + (if (executable-find "rg") (leader-def-key "ig" #'counsel-rg) (leader-def-key "ig" #'counsel-grep)) @@ -4227,9 +4225,13 @@ An alternative minibuffer completion framework: :caller 'counsel-set-frame-font))) (set-frame-font font)) (leader-def-key "iUf" #'counsel-set-frame-font) + + (defun counsel-ibuffer-kill-buffer (x) + (kill-buffer (cdr x))) (ivy-set-actions 'counsel-ibuffer '(("k" counsel-ibuffer-kill-buffer "kill buffer"))) + ;; Function to open files without Ivy to avoid lag in really huge directories (defun find-file-default (filename &optional wildcards) (interactive @@ -4237,6 +4239,7 @@ An alternative minibuffer completion framework: (find-file-read-args "Find file: " (confirm-nonexistent-file-or-buffer)))) (funcall-interactively 'find-file filename wildcards)) + :general ("M-x" #'counsel-M-x) ("C-x C-f" #'counsel-find-file)