Is there a way to prettify symbols without running into alignment issues? E.g. replacing not
with ¬
is visually pleasing, but screws up code alignment, b/c not
is 3 chars while ¬
is one char.
Since prettifying symbols only changes the way text is displayed, not how it's actually stored, it doesn't make sense for operations like text alignment to use the prettified instead of underlying representations.
lambda
is OK b/c you don't align with the end of the word, but with the second character, so it works out. That's not the case withnot
, etc. – Tianxiang Xiong May 3 '17 at 0:34(push '("not" . (?\s (Bc . Bl) ?¬ (Br . Bc) ?\s (Bl . Br) ?\s)) prettify-symbols-alist)
is one way to makenot
align. You can fiddle around with the spaces etc. as in endlessparentheses.com/… to make it the way you want it. Although, I'd consider it a much nicer solution to have a wider symbol, but I don't think you can do that within prettify-symbols, you'll probably have to mess withset-fontset-font
for that. – unhammer Jul 5 '17 at 11:12