Browse Source

Add my-fzf-all-lines

master
10sr 5 years ago
parent
commit
133298c130
Signed by: 10sr GPG Key ID: 7BEC428194130EB2
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      emacs.el

+ 8
- 1
emacs.el View File

@@ -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)


Loading…
Cancel
Save