Add find-file-default

This commit is contained in:
Jeremy Dormitzer 2019-12-26 09:38:21 -05:00
parent 09a56f129b
commit b6088ed5a2

View File

@ -2968,6 +2968,13 @@ An alternative minibuffer completion framework:
(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
(let ((completing-read-function 'completing-read-default))
(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)