I originally set a few symbols to chords but find hotstrings both easier to remember and more extensible. At this point I have over 70 hotstrings; remembering 70 chords would make my head explode, much less fitting them all on the keyboard =)
The Julia editor plugins and repl let you enter latex commands for the symbols then press tab to convert them. It works pretty well, though I would prefer something that let me fuzzy search based on longer descriptions of the symbols and showed a preview of what they looked like, maybe I should write that.
(keep in mind that it is eager: that is, you cannot have multiple sequences sharing the same prefix - “in” will mach before “into” or “infty”)
If you use Emacs, then you have really too many ways to approach this. The one I use the most is abbrev-mode, with e.g. (they are spread over multiple different tables in my init.el):
Of course, Emacs has something like this already built-in: set-input-method (C-x RET C-\) allows you to choose TeX, which lets you use LaTeX-like syntax for many symbols (e.g, \in, \infty, \exists), and insert-char (C-x 8 RET) gives you access to all of Unicode.
This question made me want to look into it for my own use:
For Gnome, IBus is used, which can read a .XCompose file, which can be formatted like
include "%L"
<Multi_key> <e> <l> <o> <f> : "∈" U2208
which gives me access to such a symbol using the Compose key
A chorded approach might be possible, Custom keyboard layout with the relevant symbols as the third option (shift is second, usually right alt is third), or a plugin for ibus might also be appropriate.
I use WinCompose (the docs recommend it, but I already had it installed for other reasons). It makes characters very easy to enter - Alt+>> for », Alt+{( for ⊂, etc. I had to put in my own sequence for 「」, which it also makes easy.
Seeing this makes me want to go start documenting things by including mini-diagrams, but then I realize how much work it would be to keep things in-sync.
If you’re writing code to produce diagrams, it’s probably worth outputting graphviz, mermaid, or maybe even SVG. Stopping in a janky ASCII-art format seems like a lot of frustration along the way.
it’s really cool, but without code that generates them, the maintenance of those seems laborous!
You can just download the javascript library I guess?
how do people generally set up their keyboards to input those characters? that’s an interesting story - I’ve never seen a writeup on that
I use a bunch of hotstrings in AutoHotKey, I can type ∈ by typing
;in
That’s cool. This approach requires a few keystrokes though - do you find yourself wishing you could chord them?
I originally set a few symbols to chords but find hotstrings both easier to remember and more extensible. At this point I have over 70 hotstrings; remembering 70 chords would make my head explode, much less fitting them all on the keyboard =)
The Julia editor plugins and repl let you enter latex commands for the symbols then press tab to convert them. It works pretty well, though I would prefer something that let me fuzzy search based on longer descriptions of the symbols and showed a preview of what they looked like, maybe I should write that.
If you are using X, then you can put it into .XCompose - e.g.,
(keep in mind that it is eager: that is, you cannot have multiple sequences sharing the same prefix - “in” will mach before “into” or “infty”)
If you use Emacs, then you have really too many ways to approach this. The one I use the most is
abbrev-mode
, with e.g. (they are spread over multiple different tables in myinit.el
):Of course, Emacs has something like this already built-in:
set-input-method
(C-x RET C-\) allows you to chooseTeX
, which lets you use LaTeX-like syntax for many symbols (e.g, \in, \infty, \exists), andinsert-char
(C-x 8 RET) gives you access to all of Unicode.This question made me want to look into it for my own use:
For Gnome, IBus is used, which can read a .XCompose file, which can be formatted like
which gives me access to such a symbol using the Compose key
A chorded approach might be possible, Custom keyboard layout with the relevant symbols as the third option (shift is second, usually right alt is third), or a plugin for ibus might also be appropriate.
Before now I’ve just used copy paste however.
Another useful way is Emacs’ TeX input-method, where you can type
\in
and it will give you ∈.For a pre-created
.XCompose
file with many mathematical symbols etc. already defined, see https://github.com/kragen/xcomposeI use WinCompose (the docs recommend it, but I already had it installed for other reasons). It makes characters very easy to enter - Alt+>> for », Alt+{( for ⊂, etc. I had to put in my own sequence for 「」, which it also makes easy.
Seeing this makes me want to go start documenting things by including mini-diagrams, but then I realize how much work it would be to keep things in-sync.
my problem exactly. could work with glue code that analyzes the relevant parts of the codebase and outputs those diagrams?
If you’re writing code to produce diagrams, it’s probably worth outputting graphviz, mermaid, or maybe even SVG. Stopping in a janky ASCII-art format seems like a lot of frustration along the way.