Skip to content
This repository has been archived by the owner on Dec 25, 2018. It is now read-only.
/ recentc Public archive

List recently closed files in Emacs

License

Notifications You must be signed in to change notification settings

ptpt/recentc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

recentc

List recently closed files in Emacs

Installation

(require 'recentc)
(recentc-mode 1)

Usage

Press C-c C-r to list recently closed files with ivy-mode (preferred) or ido-mode. Press C-c C-u to open the most recently closed file.

Configuration

Customize key bindings:

(define-key recentc-mode-map "\C-x\C-r" #'recentc-find-closed-file)
(define-key recentc-mode-map "\C-x\C-u" #'recentc-reopen-last-closed-file)

Exclude closed files under ~/.emacs.d/ (user-emacs-directory):

(add-hook 'recentc-exclude-conditions
          (lambda (filename)
            (string-prefix-p (expand-file-name user-emacs-directory)
                             (file-name-directory (expand-file-name filename)))))

Exclude closed files in .git:

(defun pt/folder-name (filename)
  (file-name-base (directory-file-name (file-name-directory filename))))

(add-hook 'recentc-exclude-conditions
          (lambda (filename)
            (string-equal ".git" (pt/folder-name (expand-file-name filename)))))

About

List recently closed files in Emacs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published