I like arbitrary substring matching for buffer completion but I want to disable it when completing file names or directories. The idea is to set
t only when
ido-find-file is being used, and
So something like this looks like it should work but it doesn't.
(setq ido-enable-prefix nil) (defun ido-init-file-dir () (when (or (eq ido-cur-item 'file) (eq ido-cur-item 'dir)) (set (make-local-variable 'ido-enable-prefix) t))) (add-hook 'ido-setup-hook 'ido-init-file-dir)