Skip to content
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

Open
Anderssorby opened this issue Jan 4, 2022 · 11 comments · May be fixed by #2852
Open

Digraphs and Unicode input tools #1438

Anderssorby opened this issue Jan 4, 2022 · 11 comments · May be fixed by #2852
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements E-help-wanted Call for participation: Extra attention is needed

Comments

@Anderssorby
Copy link
Contributor

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.

@Anderssorby Anderssorby added the C-enhancement Category: Improvements label Jan 4, 2022
@kirawi kirawi added A-helix-term Area: Helix term improvements E-good-first-issue Call for participation: Issues suitable for new contributors labels Jan 4, 2022
@pickfire pickfire added the E-help-wanted Call for participation: Extra attention is needed label Jan 9, 2022
@A-Walrus
Copy link
Contributor

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)?

@a12l
Copy link

a12l commented Feb 21, 2023

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.

@Anderssorby
Copy link
Contributor Author

Another option which would be more helix-y would be to do a text search for unicode symbols.

@imuli
Copy link

imuli commented Apr 20, 2023

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:

0009  <TAB>  HT  Character Tabulation
00fe  þ      th  Latin Small Letter Thorn
093f  ि     *i  Devanagari Vowel Sign I

@estin
Copy link
Contributor

estin commented Jul 29, 2023

imho. it's custom snippets + multi language server feature.

I was trying implements snippets for my words completion language server https://github.com/estin/simple-completion-language-server

And found that language server with snippets support may be useful for this goals
Each input must be separate by space to process them as words, this behavior may be fixed.

completion-2023-07-29_17.06.29.mp4

@the-mikedavis the-mikedavis removed the E-good-first-issue Call for participation: Issues suitable for new contributors label Aug 19, 2023
@jakobjpeters
Copy link

jakobjpeters commented Aug 29, 2023

Another option which would be more helix-y would be to do a text search for unicode symbols.

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

@bound-variable
Copy link

bound-variable commented Sep 4, 2023

Or how about US-ASCII codes for the character separators:

1c  FS  ␜  ^\  File Separator
1d  GS  ␝  ^]  Group Separator
1e  RS  ␞  ^^  Record Separator
1f  US  ␟  ^_  Unit Separator

In vim and bash we can use ctrl-v + ctrl-^ for example to enter a "record separator" and bash will display ^^ for that.

Would be nice with csv files.

@jakobjpeters
Copy link

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.

@trzza
Copy link

trzza commented Oct 8, 2023

Another option which would be more helix-y would be to do a text search for unicode symbols.

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

Kitty terminal implements this very nicely and does feel more helix-y

@chtenb
Copy link
Contributor

chtenb commented Oct 9, 2023

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.

omentic added a commit to omentic/helix-ext that referenced this issue Nov 1, 2023
omentic pushed a commit to omentic/helix-ext that referenced this issue May 1, 2024
omentic pushed a commit to omentic/helix-ext that referenced this issue May 1, 2024
omentic pushed a commit to omentic/helix-ext that referenced this issue May 1, 2024
omentic pushed a commit to omentic/helix-ext that referenced this issue May 1, 2024
omentic pushed a commit to omentic/helix-ext that referenced this issue May 1, 2024
@SeSodesa
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements E-help-wanted Call for participation: Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.