瀏覽代碼

Add my-fzf-or-find-file

master
10sr 5 年之前
父節點
當前提交
b2becc55a2
簽署人: 10sr GPG 金鑰 ID: 7BEC428194130EB2
共有 1 個檔案被更改,包括 8 行新增1 行删除
  1. +8
    -1
      emacs.el

+ 8
- 1
emacs.el 查看文件

@@ -760,7 +760,14 @@ found, otherwise returns nil."
"cut -b3-")))
(setenv "FZF_DEFAULT_COMMAND" defcmd))
(set-variable 'fzf/window-height 45)
;; (define-key ctl-x-map (kbd "C-f") 'fzf)
(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)
)

(when (safe-require-or-eval 'recently)


Loading…
取消
儲存