Like A Snowflake

Get it? One of a kind!

Moving on to a more serious note, I want to make sure everyone is aware of the wonder that is uniquify. A handy emacs plugin that makes working with multiple files with the same name far more convenient than the defaults.

There are lot’s of occasions where as a developer you end up with multiple files open that have the same name, sometimes the same file from different branches, others where you deal with generic file names like index.html. By default in emacs when you open multiple files with the same name you get buffers labeled: index.html, index.html<2>, index.html<3>, and so on. I imagine that the general consensus would be that this will get very confusing very fast and I am fully in agreement.

Now with the awesomeness of uniquify you get something like dev_branch_one/root/web/index.html and dev_branch_two/root/web/index.html as the buffer names so you can easily tell where you are. The exact naming schemes depend on the configuration and your preference, but you get the general idea. To be able to use this awesome feature set, just add (require 'uniquify) to your .emacs file along with:

(custom-set-variables
'(uniquify-buffer-name-style (quote forward) nil (uniquify)))

Modifying the renaming scheme to your liking, or you could run M-x customize-option for uniquify-buffer-name-style and have emacs let you pick your options and auto-generate the config.

%d bloggers like this: