I have recently switched from obsolete ibuffer-mode to ido mode, and it replaced C-x C-f command to ido-find-file with completions. I don't need it. How to revert it back to simple find-file?

I tried to set in configs:

(global-set-key (kbd "C-x C-f") 'find-file)

But it didn't help.

  • Workaround: when in ido-find-file, press C-f to drop back to find-file – jue Oct 28 '19 at 11:28

You need to delete the remap alist entry from ido-minor-mode-map-entry. To do that, run the function below once after enabling ido-mode.

(defun disable-ido-find-file-remap ()
    (dolist (elt ido-minor-mode-map-entry)
      (when (and (listp elt) (eq (car elt) 'remap))
        (setf (cddr elt) (assq-delete-all 'find-file (cddr elt))))))

I looked at the source file ido.el to write that function.

Remark: if you press C-f while in ido-find-file, you can use find-file (without using my above function).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.