我一直在尝试对 ido-mode 进行一些更改以使其更有用。我一直在尝试做的一件事是重新映射我在ido-find-file
. 主要的是我想用它C-d来调用ido-enter-dired
函数,而不是按C-f+C-d来做同样的事情。
到目前为止,这是我的 ido 设置:
(defun ali/ido ()
"My configuration for ido-mode"
(require 'ido)
(setq ido-create-new-buffer 'always)
;; Making sure that ido works in M-x
(global-set-key
"\M-x"
(lambda ()
(interactive)
(call-interactively
(intern
(ido-completing-read
"M-x "
(all-completions "" obarray 'commandp))))))
;; Ido keybindings
(defun ido-keybindings ()
(define-key ido-completion-map (kbd "C-d") 'ido-enter-dired))
(add-hook 'ido-setup-hook 'ido-keybindings)
(ido-everywhere t)
(ido-mode 1))
但是,每当我尝试使用时C-d,ido-find-file
总是会收到此错误:
Debugger entered--Lisp error: (error "Command attempted to use minibuffer while in minibuffer")