4 ms·
Compose key! https://en.wikipedia.org/wiki/Compose_key https://en.wikipedia.org/wiki/Compose_key languages, like ruby, haskell, and go, let you use unicode cha
by GhotiFish 13y ago
Compose key! https://en.wikipedia.org/wiki/Compose_key https://en.wikipedia.org/wiki/Compose_key
languages, like ruby, haskell, and go, let you use unicode characaters in the language. You can map those characters to key combinations with the compose key.
It comes with a giant list of key combos for accented characters too. So it's worth enabling, then defining your own combos for symbols you'd like to add to your vernacular.
- rurounijones 13y agoThe first ruby code I find with unicode characters outside the comments gets the author a smack around the head :) Yes it is all very nice that you can do this, but if you publish some code which some poor shmuck wants to modify on his non-uber-unicoded-dev-setup you just made his life a lot worse.
- SEMW 13y agoit 'is the season to be jolly' do expect(☃ + ☀).to eq(♨) end ;)
- AlecSchueler 13y agoWho is using an editor that doesn't support Unicode?
- Danieru 13y agoThat was what I thought until my patch broke the build for a windows based dev. Granted this was C++, Ruby should fair better by having a single popular runtime.
- mineo 13y agoThe compose key is also useful outside of programming environments: I'm german but still prefer english keyboard layouts for easier access to several characters (like {}[]\ and so on) which require the use of Alt Gr on german keyboards. The compose key still allows me to use german umlauts like ä by typing <Compose>"a. I've gotten quite fast in doing that because by having compose on Capslock, I can use two fingers of my left hand to press the Shift and Capslock keys (nearly) simultaneously, one finger of my right hand to press the ' key (which, together with Shift, gives me the ") and then press a afterwards.
- quadrangle 13y agoyup, I use it as compose key too
- mistercow 13y agoAlso, if you're looking for a good .XCompose file, this is one that someone on HN pointed me to some time ago: https://github.com/kragen/xcompose/blob/master/dotXCompose https://github.com/kragen/xcompose/blob/master/dotXCompose
- a_olt 13y agoAbsolutely, I started using a Compose Key for Emoji's, and other new Unicode (no kidding).