|
@@ -760,15 +760,16 @@ found, otherwise returns nil." |
|
|
"cut -b3-"))) |
|
|
"cut -b3-"))) |
|
|
(setenv "FZF_DEFAULT_COMMAND" defcmd)) |
|
|
(setenv "FZF_DEFAULT_COMMAND" defcmd)) |
|
|
(set-variable 'fzf/window-height 45) |
|
|
(set-variable 'fzf/window-height 45) |
|
|
(defun my-fzf-or-find-file () |
|
|
|
|
|
"Call fzf if usable or call find-file." |
|
|
|
|
|
(declare (interactive-only t)) |
|
|
|
|
|
(interactive) |
|
|
|
|
|
(if (and (file-remote-p default-directory)) |
|
|
|
|
|
(call-interactively 'find-file) |
|
|
|
|
|
(fzf))) |
|
|
|
|
|
(define-key ctl-x-map (kbd "C-f") 'my-fzf-or-find-file) |
|
|
|
|
|
) |
|
|
) |
|
|
|
|
|
(defun my-fzf-or-find-file () |
|
|
|
|
|
"Call fzf if usable or call find-file." |
|
|
|
|
|
(declare (interactive-only t)) |
|
|
|
|
|
(interactive) |
|
|
|
|
|
(if (and (fboundp 'fzf) |
|
|
|
|
|
(not (file-remote-p default-directory))) |
|
|
|
|
|
(fzf) |
|
|
|
|
|
(call-interactively 'find-file))) |
|
|
|
|
|
(define-key ctl-x-map (kbd "f") 'my-fzf-or-find-file) |
|
|
|
|
|
|
|
|
(when (safe-require-or-eval 'recently) |
|
|
(when (safe-require-or-eval 'recently) |
|
|
(recently-mode 1)) |
|
|
(recently-mode 1)) |
|
@@ -1630,7 +1631,9 @@ ARG is num to show, or defaults to 7." |
|
|
(define-key dired-mode-map "G" 'ignore) |
|
|
(define-key dired-mode-map "G" 'ignore) |
|
|
(define-key dired-mode-map "e" 'wdired-change-to-wdired-mode) |
|
|
(define-key dired-mode-map "e" 'wdired-change-to-wdired-mode) |
|
|
(define-key dired-mode-map "i" 'dired-get-file-info) |
|
|
(define-key dired-mode-map "i" 'dired-get-file-info) |
|
|
(define-key dired-mode-map "f" 'find-file) |
|
|
|
|
|
|
|
|
;; (define-key dired-mode-map "f" 'find-file) |
|
|
|
|
|
;; (define-key dired-mode-map "z" 'fzf) |
|
|
|
|
|
(define-key dired-mode-map "f" 'my-fzf-or-find-file) |
|
|
(define-key dired-mode-map "!" 'shell-command) |
|
|
(define-key dired-mode-map "!" 'shell-command) |
|
|
(define-key dired-mode-map "&" 'async-shell-command) |
|
|
(define-key dired-mode-map "&" 'async-shell-command) |
|
|
(define-key dired-mode-map "X" 'dired-do-async-shell-command) |
|
|
(define-key dired-mode-map "X" 'dired-do-async-shell-command) |
|
@@ -1703,7 +1706,7 @@ ARG is num to show, or defaults to 7." |
|
|
"")) |
|
|
"")) |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
(define-key ctl-x-map (kbd "f") 'my-dired-git-ls-files) |
|
|
|
|
|
|
|
|
(define-key ctl-x-map (kbd "G") 'my-dired-git-ls-files) |
|
|
(with-eval-after-load 'dired |
|
|
(with-eval-after-load 'dired |
|
|
(defvar dired-mode-map (make-sparse-keymap)) |
|
|
(defvar dired-mode-map (make-sparse-keymap)) |
|
|
(define-key dired-mode-map "G" 'my-dired-git-ls-files)) |
|
|
(define-key dired-mode-map "G" 'my-dired-git-ls-files)) |
|
|