-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Digraphs and Unicode input tools #1438
Comments
How should this work? Should the typed characters appear in the buffer, and then be replace by the Unicode character (this is how it works in vim), or should they appear at the bottom of the screen (where numbers appear before an action)? Also what should the default keyboard shortcut be (Ctrl + k is already used)? |
Another nice way to insert unicode symbols is how Emacs' input methods work. E.g. if I've the Agda input method active in the current Emacs buffer I can write the TeX command for a symbol, and the literal (i.e. the symbol) TeX command symbol get replaced with the unicode char it corresponds to. It's very nice when you write some more math heavy texts. |
Another option which would be more helix-y would be to do a text search for unicode symbols. |
So we have four columns for a text search - the unicode code point (for #4216), the literal character (escaped for control chars or modifiers), compose sequences (for this issue), and a description of the character (e.g. column 2 or 11 of UnicodeData.txt). For example:
|
imho. it's custom snippets + multi language server feature. I was trying implements snippets for my And found that language server with snippets support may be useful for this goals completion-2023-07-29_17.06.29.mp4 |
I like this way of doing it Unicode input is very important to a package I'm writing, so I really hope this feature is implemented. EDIT: typo |
Or how about US-ASCII codes for the character separators:
In vim and bash we can use Would be nice with csv files. |
I am a a bit concerned about basing it on a US standard, given that their are non-US countries and the US doesn't have a great track record cough imperial units cough. However, I am from the US and am not knowledgeable on what standards are out there. Is US-ASCII the standard internationally or are their competing ideas? If it is indeed an internationally used standard, my concern above is not relevant. |
Kitty terminal implements this very nicely and does feel more helix-y |
I think it is more powerful to put this functionality in the terminal emulator, or even better, in the OS level. Using WinCompose/XCompose you can handle unicode keyboard input pretty well, and this carries over to all other applications automatically. Keeping it confined to a (single) text editor is quite restrictive, though it may be useful for some language specific control. |
note: a better approach is here https://github.com/quantonganh/snippets-ls ref: helix-editor/helix#1438 ref: helix-editor/helix#2852 Co-authored-by: Linden Krouse <[email protected]>
Something like this would be very useful, as languages like Julia and Lean both allow the use of Unicode characters in identifiers. The Julia language extension for Vim (https://github.com/JuliaEditorSupport/julia-vim) has addressed this by allowing tab-completions of LaTe\Chi-like strings in insert mode, and I believe Lean does something similar, although their tab-completion table is not based on LaTeX. I believe such a "macro system" would be the most ergonomic way of typing Unicode characters. The backslash key is probably not the most ergonomic modifier key, though. |
In vim you can input some unicode characters by pressing Ctrl + k in insert mode and then typing to chars like *l for λ. There are other ways to, but this is very convenient and customizable.
The text was updated successfully, but these errors were encountered: