Sfoglia il codice sorgente

Add my-fzf-all-lines

master
10sr 5 anni fa
parent
commit
133298c130
Firmato da: 10sr ID Chiave GPG: 7BEC428194130EB2
1 ha cambiato i file con 8 aggiunte e 1 eliminazioni
  1. +8
    -1
      emacs.el

+ 8
- 1
emacs.el Vedi 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)


Caricamento…
Annulla
Salva