5 ms·
Uni: Query the Unicode database from the CLI, with good support for emojis
- the8472 7y agoI would love something like this for ibus
- yorwba 7y agoIf you're willing to switch to a different input method, fcitx supports Unicode search: https://fcitx-im.org/wiki/Unicode https://fcitx-im.org/wiki/Unicode I mostly use it for trivial stuff like proper Unicode arrows → instead of ASCII ->, but I think it's pretty cool to have the option to type any Unicode character I want.
- pdfbadforunicod 7y agoI use it but it always seems kinda "buggy" to select the desired char
- reanimus 7y agoJust mentioned in a comment myself: https://github.com/salty-horse/ibus-uniemoji https://github.com/salty-horse/ibus-uniemoji
- pdfbadforunicod 7y agoOr .. use vim Unicode "Hover" to name. Search is available, not live though
- chrismorgan 7y agoWhat are you meaning by “hover”? All I know of is ga (a.k.a. the misnamed :ascii), which tells you the decimal, hex and octal for the Unicode scalar values, but doesn’t give you a name. Oh, are you meaning https://github.com/chrisbra/unicode.vim https://github.com/chrisbra/unicode.vim?
- pdfbadforunicod 7y agoYes to chrisbra. Wish I could live search
- JNRowe 7y agofzf-vim's :BLines¹ can enable a live search for most basic needs. For example, something like unicode.vim's :UnicodeTable, followed by :BLines, then yl to grab the char. Note: I'm only pointing this out in the general case of wanting a live search on some data, because uni and the provided uni.vim seem to be a far better solution anyway. ¹ https://github.com/junegunn/fzf.vim https://github.com/junegunn/fzf.vim
- chrisbra80 7y agowhat are you missing? Please use the issue tracker for discussions of better features.
- Carpetsmoker 7y agoUni started life as a replacement to that plugin (note how how the output is similar) as I got tired of opening Vim all the time :-)
- pdfbadforunicod 7y agoBut it opens instantly! And zz to close
- Carpetsmoker 7y agoNot as "instant" as dmenu, the searching is kinda awkward and not emoji-aware, and you can't use it in pipes.
- pdfbadforunicod 7y agoCtrl-p like functionality wouldn't be too difficult... But I see your point
- petepete 7y agoKitty has something like this built in too: https://sw.kovidgoyal.net/kitty/kittens/unicode-input.html https://sw.kovidgoyal.net/kitty/kittens/unicode-input.html
- est 7y agoOr any text box on Mac hit ctrl+cmd+space, start typing unicode names
- reanimus 7y agoI use https://github.com/salty-horse/ibus-uniemoji https://github.com/salty-horse/ibus-uniemoji to search emoji/unicode glyphs using the input. Works pretty well for me.
- JNRowe 7y agoI really appreciate the section on alternatives¹, and I wish more people would add these to their projects. Not only does it show the author is aware of the current landscape, it may even help users to find tools that better fit their needs. Imagine a tip of my virtual hat, @Carpetsmoker! From the README's notes on emoj "not a fan of npm (has 1862 dependencies)", I'm actually tempted to try that just to find out if it is true ;) 1. https://github.com/arp242/uni/blob/master/README.markdown#alternatives https://github.com/arp242/uni/blob/master/README.markdown#al...
- Carpetsmoker 7y agoThanks :-) > From the README's notes on emoj "not a fan of npm (has 1862 dependencies)", I'm actually tempted to try that just to find out if it is true ;) That's the number "npm install" showed after it was done (which took quite a while too), so I assume it's accurate?
- yaantc 7y agoYes, listing alternatives is a really good thing. Another alternative (not from me, just an user): https://github.com/NoraCodes/charpicker https://github.com/NoraCodes/charpicker It's just shell and rofi, and from an IDE can easily be hooked to a key combination. As it's shell, it's also easy to tweak if needed. For those using X11, I found that xdotool used by charpicker has some limitation. From the xdotool man page: "Typing unusual symbols under non-us keybindings is known to occasionally send the wrong character.", and I've seen it happens with unicode characters. Instead, one can paste to the X11 clipboard: echo -n "$selected_symbol" | xclip -i And then fake a middle click to insert in the current application: xdotool click 2 It's still using xdotool but just to send a click not process the inserted character. That's never failed for me so far.
- gioele 7y agoAnd yet, among the alternatives, there is no mention of `unicode`, a standard-ish command line tool that does more or less the same thing and is available in common Linux distros since ~2005. Example output (the CLI's output is colored): $ unicode € U+20AC EURO SIGN UTF-8: e2 82 ac UTF-16BE: 20ac Decimal: € Octal: \020254 € Category: Sc (Symbol, Currency) Bidi: ET (European Number Terminator) $ unicode U+1F30D EARTH GLOBE EUROPE-AFRICA UTF-8: f0 9f 8c 8d UTF-16BE: d83cdf0d Decimal: Octal: \0371415 Category: So (Symbol, Other) Bidi: ON (Other Neutrals) U+1F3E4 EUROPEAN POST OFFICE UTF-8: f0 9f 8f a4 UTF-16BE: d83cdfe4 Decimal: Octal: \0371744 Category: So (Symbol, Other) Bidi: ON (Other Neutrals) I am not being sarcastic here. I am just noticing that the software landscape is vast, and that it is often hard to know what exists out there. Even old glories are forgotten. There should be an interdisciplinary stackoverflow where you can ask: "does this already exist?"
- perlancar3 7y agoThere's also a Perl script with the same name since 2009, written by Audrey Tang (of pugs fame) and then rewritten by Ricardo Signes (of Dist::Zilla fame). I've used this script for years, not realizing there were other implementations of it. Nice to know. https://metacpan.org/pod/uni https://metacpan.org/pod/uni