From 133298c130b0da3ed5b0d1e011d61c4a6d6fda74 Mon Sep 17 00:00:00 2001 From: 10sr <8.slashes@gmail.com> Date: Tue, 19 Mar 2019 12:23:34 +0900 Subject: [PATCH] Add my-fzf-all-lines --- emacs.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/emacs.el b/emacs.el index 480fb3b..d74771a 100644 --- a/emacs.el +++ b/emacs.el @@ -743,7 +743,6 @@ found, otherwise returns nil." ;; - parent directory (..) ;; ripgrep cannot list directories... ;; (setenv "FZF_DEFAULT_COMMAND" "rg --files --hidden --follow --glob '!.git/*' --no-ignore") -;; "rg -nH --hidden --follow --glob '!.git/*' ^" (let* ((find (if (executable-find "bfs") ;; Breadth-first find https://github.com/tavianator/bfs "bfs" @@ -785,6 +784,14 @@ found, otherwise returns nil." (call-interactively 'find-file))) (define-key ctl-x-map (kbd "f") 'my-fzf-or-find-file) +(defun my-fzf-all-lines () + "Fzf all lines." + (interactive) + (let ((process-environment (cl-copy-list process-environment))) + (setenv "FZF_DEFAULT_COMMAND" "rg -nH --hidden --follow --glob '!.git/*' ^") + (fzf))) +(define-key ctl-x-map "L" 'my-fzf-all-lines) + ;; recently (when (safe-require-or-eval 'recently)