Glasses-mode

If you’re like me and hate CamelCaseMode and all its evil brethren, there’s a solution: glasses-mode. Ruslan Bekenev reminds us of a long standing command that will display camel case names as underscore delimited instead. By “display” I mean that the underlying code isn’t changed, just the way it’s displayed to you. Many of us find it hard to read camel cased identifiers so this is a useful functionality.

It would be worth knowing about even if it just displayed the identifiers sanely but there’s more. You can edit the text and the identifiers will be automatically adjusted. You can even grep for the identifier under cursor and the right thing will happen because, after all, the buffer isn’t changed, just what you see.

This is, to be sure, a small thing but it’s another example of how all those small things add up to make editing with Emacs easy and a joy. If you don’t already know about glasses-mode, take a look at Bekenev’s post.

This entry was posted in General and tagged . Bookmark the permalink.