Skip to content

Instantly share code, notes, and snippets.

@MaikBeckmann
Created September 9, 2012 11:04
Show Gist options
  • Save MaikBeckmann/3683817 to your computer and use it in GitHub Desktop.
Save MaikBeckmann/3683817 to your computer and use it in GitHub Desktop.
(require 'ido)
(ido-mode t)
(setq ido-enable-prefix nil
ido-enable-flex-matching nil
ido-create-new-buffer 'never
ido-max-prospects 10
ido-default-buffer-method 'selected-window
ido-default-file-method 'selected-window)
;; List of N most recent files, persisent between emacs session.
(require 'recentf)
(setq recentf-exclude
(append recentf-exclude
'("/.emacs.d/el-get/" "~$" "/.autosaves/"
"/emacs.d/elpa/" "/emacs.d/url/"))
recentf-max-saved-items 50)
(recentf-mode t)
;; Get ido to handle recentf results
(defun ido-recentf-open ()
"Use `ido-completing-read' to \\[find-file] a recent file"
(interactive)
(if (find-file (ido-completing-read "Find recent file: " recentf-list))
(message "Opening file...")
(message "Aborting")))
(global-set-key (kbd "C-x C-r") 'ido-recentf-open)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment