4 ms·
Seems very nice. It's a little odd that the examples include characters that are hard to type on most keyboards.
by tgb 10y ago
Seems very nice. It's a little odd that the examples include characters that are hard to type on most keyboards.
- anotheryou 10y agoYou can also write ^2 instead of ² and "degrees". But yea, a bit weird as an example.
- dagw 10y ago"deg" and "rad" seems to work as well so you don't have to type "degrees" and "radians"
- kps 10y agoYou just need a better layout. However, everything the examples inspired me to try fails. 2² works but 2⁴ fails. 30° works but 30°25′8″ fails. 10×3÷4 fails. ‘pi’ and ‘hbar’ are predefined but ‘π’ and ‘ℏ’ aren't.
- sharkdp 10y agoAuthor here, thank you for the feedback! I will try to add these. Tracked here: https://github.com/sharkdp/insect/issues/44 https://github.com/sharkdp/insect/issues/44
- yorwba 10y agoI have a German keyboard, which has keys for °,² and ³. I really liked that when I was typing my math homework in high school. It's not really ergonomic for programming though, what with {[]} not being easily reachable. So now I have my keyboard permanently set to US layout, frustrating anyone who expects the key labels to make sense.
- Nadya 10y agoI'd argue they can be easy to type on most keyboards - just that most people do not enable the functionality and it usually is not enabled-by-default. So not "hard" but "atypical". On Linux, set up a `Compose key`[0]. That makes `°` become `Compose o o`. If you're on Windows, a useful thing to do is enable the US-International keyboard so that you can more easily type characters with accents, so you can type Pokémon properly. US-International also respects the AltGR/Right alt to compose many characters [1]. For example, I can type ² by pressing AltGr+2 which really is quite easy. I can also type ° by pressing AltGr+Shift+; [0] https://en.wikipedia.org/wiki/Compose_key https://en.wikipedia.org/wiki/Compose_key [1] https://en.wikipedia.org/wiki/AltGr_key https://en.wikipedia.org/wiki/AltGr_key
- sharkdp 10y agoThank you for the feedback! I have a german keyboard and haven't really considered this. I will try to improve the examples. Edit: should be fixed now.
- carreau 10y agothe way some other repl improve this is by allowing to tab complete form latex definition. For EG: \habar<tab>, \pi<tab> or 8^2<tab> will expand to what you expect. This also allows for combining like F\vec<tab> of \theta<tab>\dot<tab>