Procházet zdrojové kódy

Treak some keybind

master
10sr před 5 roky
rodič
revize
44032ed459
Podepsáno: 10sr ID GPG klíče: 7BEC428194130EB2
1 změnil soubory, kde provedl 13 přidání a 10 odebrání
  1. +13
    -10
      emacs.el

+ 13
- 10
emacs.el Zobrazit soubor

@@ -760,15 +760,16 @@ found, otherwise returns nil."
"cut -b3-")))
(setenv "FZF_DEFAULT_COMMAND" defcmd))
(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)
(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 "e" 'wdired-change-to-wdired-mode)
(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 "&" '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
(defvar dired-mode-map (make-sparse-keymap))
(define-key dired-mode-map "G" 'my-dired-git-ls-files))


Načítá se…
Zrušit
Uložit