fileability/chocolat-public — Issue #800: Allow truffles to display different text from that present in the file
Author: mariuskempe
Created: 2012-03-09 19:15:09+00:00
State: open

I have a friend who has an Emacs setup where he types the keyword `function` in a particular programming language and Emacs displays `λ` instead. It doesn't replace anything, though! It just displays the replacement text, but underneath in the file it's still plain-old Ascii `function`. It's a neat way of getting more readable source code while still being able to communicate code with others.

Of course, this would be defined for particular languages - not every instance of `function` in every file would be replaced, but rather only if you're in, say, JavaScript mode.

I have a list of other substitutions in mind, which I would enjoy using in my code:
* as ×
/ as ÷
-> as →
<- as ←
>= as ≥
function as λ or ƒ
sum as ∑
product as ∏
:: as ∷ (for Haskell)

...well, you can imagine the possibilities. Hope you like the idea!