Last active
March 27, 2020 00:10
-
-
Save agzam/a9b7062f8785d733777132a216d99891 to your computer and use it in GitHub Desktop.
Custom iBuffer filter for unsaved buffers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define-ibuffer-filter unsaved-file-buffers | |
"Toggle current view to buffers whose file is unsaved." | |
(:description "file is unsaved") | |
(ignore qualifier) | |
(and (buffer-local-value 'buffer-file-name buf) | |
(buffer-modified-p buf))) | |
(define-key ibuffer-mode-map (kbd "/ u") #'ibuffer-filter-by-unsaved-file-buffers) | |
;; Then you can press </ u> in iBuffer | |
;; Note that in Spacemacs you'd have to use <\ u> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment