(require 'uniquify)You can customize uniquify-buffer-name-style. Read more with C-h-v uniquify-buffer-name-style.
(setq uniquify-buffer-name-style 'post-forward-angle-brackets)
Tuesday, June 28, 2011
Distinguish buffers of the same filename in Emacs
Have you ever opened multiple files of the same name only to find you can't tell which buffer holds which file? By default, Emacs adds a <number> postfix to the name of subsequent buffers opened which has the same filename as the filename of a preexisting buffer. Sometimes, it is not convenient to remember which postfix tag goes with which file. The solution is to use Uniquify. Uniquify postfixes the buffer name with the directory name of the file. Add the following to your .emacs file.
Subscribe to:
Post Comments (Atom)
3 comments:
COOL. You saved my live :)
It even automatically switches to the parent of the parent directory, if the direct parent is not enough to distinguish them.
+1
You're making my .emacs grow and grow and grow... :)
Glad you like it. :)
Post a Comment