0

I very often find myself in the following situation:

  • Open a file in a directory foo/bar

  • Rename the file and/or created another one from a command line:

cd foo
mv bar bar2
touch bar3
  • Try to open any of the file bar2 or bar3 from emacs using C-x C-f which uses ido-find-file

... and that doesn't work because the ido only "remembers" bar in the directory foo (and so I have to switch to emacs find-file)...

Is there a way to reset the cache/history of the current directory in Ido?

Here is my ido setup

  (use-package ido
    :ensure t)
  (use-package ido-completing-read+
    :ensure t)
  (use-package flx-ido
    :ensure t)

  (push ".exe"  completion-ignored-extensions)
  (push ".so"   completion-ignored-extensions)
  (push ".o"    completion-ignored-extensions)
  (push ".dSYM" completion-ignored-extensions)
  (push ".pdf"  completion-ignored-extensions)
  (push ".png"  completion-ignored-extensions)

  (setq ido-enable-prefix nil
        ido-enable-last-directory-history nil
        ido-enable-flex-matching t
        ido-record-commands nil
        ido-max-work-directory-list 0
        ido-max-work-file-list 0
        ido-create-new-buffer 'always
        ido-use-filename-at-point 'guess
        ido-max-prospects 10
        ido-save-directory-list-file (expand-file-name "ido.hist")
        ido-everywhere t
        ido-default-file-method 'selected-window
        ido-auto-merge-work-directories-length -1
        ido-ignore-extensions t)
  (ido-mode +1)
  (ido-ubiquitous-mode +1)

  ;;; smarter fuzzy matching for ido
  (flx-ido-mode +1)
  ;; disable ido faces to see flx highlights
  (setq ido-use-faces nil)

Your Answer

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

Browse other questions tagged or ask your own question.