Enable recentf-mode in Emacs
This commit is contained in:
parent
3e21fca289
commit
1acb64f9c8
2 changed files with 11 additions and 3 deletions
10
oni-core.el
10
oni-core.el
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 2020.0203.215730
|
;; Version: 2020.0224.220825
|
||||||
;; Package-Requires: (oni-data-dir expand-region multiple-cursors embrace helpful)
|
;; Package-Requires: (oni-data-dir expand-region multiple-cursors embrace helpful)
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -28,6 +28,7 @@
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(require 'oni-data-dir)
|
(require 'oni-data-dir)
|
||||||
|
(require 'recentf)
|
||||||
|
|
||||||
(defconst oni-core--auto-save-directory (oni-data-dir-locate "auto-save-files/")
|
(defconst oni-core--auto-save-directory (oni-data-dir-locate "auto-save-files/")
|
||||||
"Directory where auto-saves go.")
|
"Directory where auto-saves go.")
|
||||||
|
@ -64,6 +65,8 @@
|
||||||
|
|
||||||
(setq abbrev-file-name (oni-data-dir-locate "abbrev_defs"))
|
(setq abbrev-file-name (oni-data-dir-locate "abbrev_defs"))
|
||||||
|
|
||||||
|
(setq recentf-save-file (oni-data-dir-locate "recentf"))
|
||||||
|
|
||||||
;;; Get rid of the default help tooltip on the mode-line.
|
;;; Get rid of the default help tooltip on the mode-line.
|
||||||
(setq mode-line-default-help-echo nil)
|
(setq mode-line-default-help-echo nil)
|
||||||
|
|
||||||
|
@ -98,7 +101,7 @@
|
||||||
(global-set-key (kbd "C-M-SPC") 'er/expand-region)
|
(global-set-key (kbd "C-M-SPC") 'er/expand-region)
|
||||||
(global-set-key (kbd "M-+") 'mc/mark-next-like-this)
|
(global-set-key (kbd "M-+") 'mc/mark-next-like-this)
|
||||||
(global-set-key (kbd "C-c (") 'embrace-commander)
|
(global-set-key (kbd "C-c (") 'embrace-commander)
|
||||||
(global-set-key (kbd "C-x f") 'ffap)
|
(global-set-key (kbd "C-x M-f") 'ffap)
|
||||||
(global-set-key (kbd "C-x C-b") 'ibuffer-jump)
|
(global-set-key (kbd "C-x C-b") 'ibuffer-jump)
|
||||||
|
|
||||||
(global-set-key [remap describe-function] 'helpful-callable)
|
(global-set-key [remap describe-function] 'helpful-callable)
|
||||||
|
@ -109,8 +112,11 @@
|
||||||
(global-set-key (kbd "C-<left>") 'winner-undo)
|
(global-set-key (kbd "C-<left>") 'winner-undo)
|
||||||
(global-set-key (kbd "C-<right>") 'winner-redo)
|
(global-set-key (kbd "C-<right>") 'winner-redo)
|
||||||
|
|
||||||
|
(run-with-idle-timer 10 t 'recentf-save-list)
|
||||||
|
|
||||||
(electric-indent-mode -1)
|
(electric-indent-mode -1)
|
||||||
(winner-mode)
|
(winner-mode)
|
||||||
|
(recentf-mode)
|
||||||
|
|
||||||
(add-to-list 'display-buffer-alist
|
(add-to-list 'display-buffer-alist
|
||||||
`(,(rx string-start
|
`(,(rx string-start
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 2019.0904.210423
|
;; Version: 2020.0224.214110
|
||||||
;; Package-Requires: (counsel diminish helpful)
|
;; Package-Requires: (counsel diminish helpful)
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -48,6 +48,8 @@
|
||||||
'counsel-find-file
|
'counsel-find-file
|
||||||
'(("C" oni-counsel-create-directory-and-file "create")))
|
'(("C" oni-counsel-create-directory-and-file "create")))
|
||||||
|
|
||||||
|
(define-key counsel-mode-map (kbd "C-x f") 'counsel-recentf)
|
||||||
|
|
||||||
;;;###autoload(with-eval-after-load 'counsel (require 'oni-counsel))
|
;;;###autoload(with-eval-after-load 'counsel (require 'oni-counsel))
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(add-hook 'emacs-startup-hook 'counsel-mode)
|
(add-hook 'emacs-startup-hook 'counsel-mode)
|
||||||
|
|
Loading…
Reference in a new issue