5 ms·
Maybe it’s time for a plugin that does this (or maybe it already exists?): You press the backslash key, enter the name of the symbol, then press enter, and the
by llamathrowaway 7y ago
Maybe it’s time for a plugin that does this (or maybe it already exists?):
You press the backslash key, enter the name of the symbol, then press enter, and the symbol will show up in your buffer.
Something like:
\lambda -> λ
\Lambda -> Λ
\\ -> \
et cetra.
- penteract 7y agohttps://github.com/JunoLab/atom-latex-completions https://github.com/JunoLab/atom-latex-completions is one that does this.
- _emacsomancer_ 7y agoxcompose does something like that. (as does TeX for that matter, in a different fashion.)
- frosted-flakes 7y agoA dedicated global compose key solves this problem very elegantly. Hitting the ◆ compose key (right alt for me) followed by a series of intuitive characters inserts the corresponding character. For example: ◆ - - - produces an em dash (—) ◆ - - . produces an en dash (–) ◆ ' e produces é ◆ | c produces the cent symbol (¢) Usually, you can just guess the combination and be right 3/4 times. Otherwise, it's fairly easy to look it up, or create it if it doesn't exist yet. Some distros of Linux have this built-in, but I use WinCompose[1] on Windows. [1]https://github.com/samhocevar/wincompose https://github.com/samhocevar/wincompose
- Freak_NL 7y ago> Some distros of Linux have this built-in […] Some? Nearly all of them do — usually it just needs to be activated in the desktop environment. I used a … and an — in this post using the compose key without even thinking twice. > Usually, you can just guess the combination and be right 3/4 times. ¾ even. Just guessing that it was <comp> 3 4.
- btown 7y agomacOS has something very similar with the option key, but the set of characters doesn’t include all Greek letters which is incredibly annoying: https://sites.psu.edu/symbolcodes/mac/codemac/ https://sites.psu.edu/symbolcodes/mac/codemac/
- frosted-flakes 7y agoExcept most of the key combinations are not intuitive. I could never guess them like I could with a compose key.
- xiphias2 7y agoAtom in Julia Pro does this (with autocomletion), and I've been using it in practice to clarify math in my code. It's great in practice.
- improbable22 7y agoAlso works in the Julia REPL, and jupyter notebooks. I'd hope that the tooling for any language which allows unicode variable names would support this.
- danidiaz 7y agoRelatively easy in Vim with digraphs (:h digraph) Ctrl-K l* produces λ Ctrl-K L* produces Λ Unsurprisingly, Emacs also supports this when programming in Agda (\lambda) i'm not sure if it's a builtin feature or part of the Agda plugin. In Agda using Unicode identifiers is widely accepted, even in the standard library: https://github.com/agda/agda-stdlib/blob/master/src/Relation/Binary.agda https://github.com/agda/agda-stdlib/blob/master/src/Relation...
- dan-robertson 7y agoEmacs has this plugin (well not a plugin because it’s built in). One can select an input mode. Some translate directly (e.g. a Greek input mode where typing a gives an alpha). There is also a TeX mode like what you describe and another mode which is more concise (e.g. &a for alpha, where the means Greek). The difference from what you described is that instead of some escape sequence for these special prefixes, they are just never converted if they don’t match and you move the point away.