Skip to content

Instantly share code, notes, and snippets.

@pedroteixeira
Created December 30, 2010 13:42
Show Gist options
  • Save pedroteixeira/759800 to your computer and use it in GitHub Desktop.
Save pedroteixeira/759800 to your computer and use it in GitHub Desktop.
;; recentf
(require 'recentf) ;; save recently used files
(setq
recentf-save-file "~/.emacs.d/cache/recentf"
recentf-max-saved-items 1000 ;; max save 100
recentf-max-menu-items 15) ;; max 15 in menu
(recentf-mode t) ;; turn it on
(defun xsteve-ido-choose-from-recentf ()
"Use ido to select a recently opened file from the `recentf-list'"
(interactive)
(let ((home (expand-file-name (getenv "HOME"))))
(find-file
(ido-completing-read "Recentf open: "
(mapcar (lambda (path)
(replace-regexp-in-string home "~" path))
recentf-list)
nil t))))
(global-set-key [(meta f12)] 'recentf-open-files)
(global-set-key [(meta f11)] 'xsteve-ido-choose-from-recentf)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; windows
;;
;; use super + arrow keys to switch between visible buffers
(require 'windmove)
(windmove-default-keybindings 'super) ;; will be overridden
(global-set-key (kbd "<C-s-left>") 'windmove-left)
(global-set-key (kbd "<C-s-right>") 'windmove-right)
(global-set-key (kbd "<C-s-up>") 'windmove-up)
(global-set-key (kbd "<C-s-down>") 'windmove-down)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment