Guest User

Untitled

a guest
Jul 18th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1.  
  2.  
  3. ;; recentf
  4. (require 'recentf) ;; save recently used files
  5. (setq
  6. recentf-save-file "~/.emacs.d/cache/recentf"
  7. recentf-max-saved-items 1000 ;; max save 100
  8. recentf-max-menu-items 15) ;; max 15 in menu
  9. (recentf-mode t) ;; turn it on
  10.  
  11.  
  12. (defun xsteve-ido-choose-from-recentf ()
  13. "Use ido to select a recently opened file from the `recentf-list'"
  14. (interactive)
  15. (let ((home (expand-file-name (getenv "HOME"))))
  16. (find-file
  17. (ido-completing-read "Recentf open: "
  18. (mapcar (lambda (path)
  19. (replace-regexp-in-string home "~" path))
  20. recentf-list)
  21. nil t))))
  22.  
  23.  
  24. (global-set-key [(meta f12)] 'recentf-open-files)
  25. (global-set-key [(meta f11)] 'xsteve-ido-choose-from-recentf)
  26. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  27.  
  28.  
  29.  
  30.  
  31. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  32. ;; windows
  33. ;;
  34. ;; use super + arrow keys to switch between visible buffers
  35. (require 'windmove)
  36. (windmove-default-keybindings 'super) ;; will be overridden
  37. (global-set-key (kbd "<C-s-left>") 'windmove-left)
  38. (global-set-key (kbd "<C-s-right>") 'windmove-right)
  39. (global-set-key (kbd "<C-s-up>") 'windmove-up)
  40. (global-set-key (kbd "<C-s-down>") 'windmove-down)
Add Comment
Please, Sign In to add comment