Emacs: glasses-mode
February 24, 2025
Let’s say I have this code (TypeScript) with long camelCased variable names.
I’m ok with camelCase variables especially if this is a convention for a language. But at the same time I find it a bit difficult to read compared to underscore_case style.
Meet M-x glasses-mode
.
A beautiful minor mode that is there, built-in, since Emacs 21.
Look what it does
The mode doesn’t change text in the buffer. It just makes it look like camelCase variable names became underscore_case.
It is possible to keep editing the buffer and variable names will adjust on the fly. You can use your M-x rg
or M-x grep
and they will search for the
text under cursor in camelCase because, again, text in the buffer isn’t changed.
Amazing.
Feel free to contact me for feedback or questions. Find my contacts on About page.