Instantly share code, notes, and snippets.

Embed
What would you like to do?
Relative filenames in ibuffer when using projectile
;; this assumes you have projectile installed already
(define-ibuffer-column project-file
(:name "🚀Filename")
(format "%s" (if (and buffer-file-name (projectile-project-root))
(dired-replace-in-string (projectile-project-root) "::" (buffer-file-name))
(buffer-name))))
;; Modify the default ibuffer-formats
(setq ibuffer-formats
'((mark modified read-only locked " "
(name 18 18 :left :elide)
" "
(size-h 9 -1 :right)
" "
(mode 16 16 :left :elide)
" "
(project-file 16 -1 :left :elide))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment