5 ms·
How do people generally input these custom operators/characters such as the vector method call and the set operator used in the article?
by werdnapk 7y ago
How do people generally input these custom operators/characters such as the vector method call and the set operator used in the article?
- dan-robertson 7y agoTypically either by setting up a keyboard layout, using xcompose, or using an editor which can insert them (eg use input modes in emacs). An alternative is to use the “Texas” versions which are made out of ascii but are slightly bigger.
- yellowapple 7y agoYou usually don't need to. Perl6 supports both Unicode and ASCII (a.k.a. "Texas") versions of these operators: https://docs.perl6.org/language/unicode_ascii https://docs.perl6.org/language/unicode_ascii To answer the question, though: in my case I use X11's support for compose key sequences (with Caps Lock as my compose key) whenever possible (TODO: figure out a reliable way to add new sequences to fill in the gaps; I've been meaning to be able to type Compose + S + H + R + U + G to be able to instantly pop in that one shrug emote without having to search for it all the time). Emacs (and other editors presumably) could probably be programmed to replace ASCII operators with Unicode operators on the fly, though I don't know of any packages which do this.
- smacktoward 7y ago> TODO: figure out a reliable way to add new sequences to fill in the gaps You can do that with an .XCompose file in your home directory. See https://github.com/kragen/xcompose https://github.com/kragen/xcompose for more info.
- yellowapple 7y agoI've tried .XCompose before, but it didn't seem to work at all (hence the reliable specifier in my TODO :) ). Supposedly uim helps with that, but of course I can't seem to actually compile it (and there ain't a Slackbuild for it), so... <compose> <s> <h> <r> <u> <g>