For example, if I have a Test.cpp and a Test.h and one of them is open, ido-find-file will often suggest the already-open one first if I type "Test". Likewise when both are open and the current buffer contains one of them. It does not happen all the time, but frustratingly often. I never want to switch to/open the file I already have open. Is there any way to prevent this?

1 Answer 1


Always preventing this is a tall order, but you can learn to live with it.

The default is to list files in the order with the most recent first and oldest last. However, files visible in the current frame are put at the end of the list. The ordering can be modified by using the hook ido-make-buffer-list-hook. (see the Customization section of the info manual)

Also ido-find-file has a number of commands that can be used to change the order of the file list (C-s, C-r) or cycling the previous work directories (M-p, M-n). For the full functionality do C-h f ido-find-file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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