I’ve written before about what prettify-symbols-mode can do for your buffers,
ranging from pure eye-candy to signficant readability improvements. Simply put,
this minor-mode “disguises” some strings in your buffer to look like something
else. For instance, in emacs-lisp-mode it makes lambda be displayed as λ,
and (for the next release) it’ll apply to a wide range of symbols in
(la)tex-mode too.
The only problem is that this (obviously) hides the symbol itself, and there’s
no way of revealing it other than disabling the mode. That’s usually not a big
deal, but it can get just a little annoying sometimes—specially when a mode
adds over 400 elements to prettify-symbols-alist.
In Emacs 25.1, thanks to Tassilo Horn, there’s a new variable called
prettify-symbols-unprettify-at-point. If you set it to t, prettify-symbols
will “unprettify” a symbol as long as the cursor is inside it. So you can easily
(and temporarily) reveal a symbol by just moving over to it.
My preference is to set it to right-edge which also reveals the symbol if the
point is immediately after it.
New in Emacs 25.1: Have prettify-symbols-mode reveal the symbol at point
28 Dec 2015, by Artur Malabarba.New in 25.1 post series
I’ve written before about what
prettify-symbols-mode
can do for your buffers, ranging from pure eye-candy to signficant readability improvements. Simply put, this minor-mode “disguises” some strings in your buffer to look like something else. For instance, inemacs-lisp-mode
it makeslambda
be displayed asλ
, and (for the next release) it’ll apply to a wide range of symbols in(la)tex-mode
too.The only problem is that this (obviously) hides the symbol itself, and there’s no way of revealing it other than disabling the mode. That’s usually not a big deal, but it can get just a little annoying sometimes—specially when a mode adds over 400 elements to
prettify-symbols-alist
.In Emacs 25.1, thanks to Tassilo Horn, there’s a new variable called
prettify-symbols-unprettify-at-point
. If you set it tot
,prettify-symbols
will “unprettify” a symbol as long as the cursor is inside it. So you can easily (and temporarily) reveal a symbol by just moving over to it.My preference is to set it to
right-edge
which also reveals the symbol if the point is immediately after it.Tags: emacs-25, news, init.el, emacs,
Define context-aware keys in Emacs »
« Faster pop-to-mark command
Related Posts
Emacs 25 is out! What are the new features and what were my predictions in emacs-25
New in Emacs 25.1: Archive priorities and downgrading packages in emacs-25
New in Emacs 25.1: Filtering by status and archive in emacs-25
Content © 2019, All rights reserved. Icons under CC3.0.