I have two files with the same name but in different directories:
apples/main.cpp
oranges/main.cpp
I open them in one emacs window via emacs apples/main.cpp oranges/main.cpp
When I use C-x b
to switch between these two buffers, the buffer names are "main.cpp" and "main.cpp<2>". I would love to be able to see the full path of these two files when switching buffers, so that I may disambiguate between the apples and the oranges version. Is there a way to do this?
One way could be to modify whatever code generates the <2> after the second main.cpp when Emacs detects that a buffer with that name is already open. However, I couldn't find how to do this.
Use uniquify. I use it like that:
(require 'uniquify)
(setq uniquify-buffer-name-style 'forward)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With