-
Notifications
You must be signed in to change notification settings - Fork 222
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
Emacs like TeX Input Method #289
Comments
Only following is available: type and select |
Tested. Yes, that's current workflow - but not practical. How many people knows "\u03B2" is for beta that got to be entered in a special way? Most/I would just find it from/copy web and paste it. Frankly, not many editors have this feature. Julia's REPL does it nicely. This is how Emacs does it -> [https://emacs.stackexchange.com/questions/5647/how-to-input-special-character-such-as-celsius-symbol-and-common-greek-letters] Looking forward for this feature. |
The Emacs wiki https://www.emacswiki.org/emacs/TeXInputMethod Currently Tab is used to insert tab character (or expand it to spaces) and indent text, Enter is used to insert new line and auto indent on next line, Space is not intercepted. |
Some pointers of implementation. |
Implemented by 11be675. This change make the exe 60 KiB bigger (with 56 KiB data grabbed from https://docs.julialang.org/en/v1.7-dev/manual/unicode-input/). feel free to test latest builds from https://github.com/zufuliu/notepad2/actions @maboroshin, @VenusGirl: there is a menu item need translation. |
…irectly to avoid extra UTF-32 to UTF-16 conversion, issue #289.
Thanks for your prompt action. Downloaded a version from https://github.com/zufuliu/notepad2/actions/runs/605432502. It works momentarily. Below are the steps to reproduce the error.
It would really nice to have the drop-down selection display actual symbol/smiley. Currently, the drop down selection shows symbol_name_in_text. |
@humphreylee can you provide a screenshot for the "XCE" bug? especial, statusbar (which contains encoding info, like UTF-8) and text around |
Please test latest build again, and provide more info (file encoding, surrounding text and steps as before) when it still failed. The |
Tested latest version from https://github.com/zufuliu/notepad2/actions/runs/607900939. Observations are below.
Thank you for completing the requested enhancement. |
…mpletion completed with Tab key, issue #289.
Tab should works as expected now. i.e. type A further enhancement is showing the symbol with it's name, just like GitHub emoji drop down list (see screenshot in #289 (comment)), implement this is straightforward. |
Tested the last two versions (CI #541 and CI#542). Some observations below. |
The "xCE" is fixed by 1e4d859. Show symbol in auto-completion drop-down list will not be implemented before https://sourceforge.net/p/scintilla/bugs/2179/ is implemented. The drop-down list is rendered with GDI, which has bugs on rendering characters not implemented by the selected font: unsupported characters will be rendered as boxes (this bug was reported many times). e.g., you can download https://github.com/zufuliu/notepad2/blob/master/scintilla/win32/LaTeXInputData.h, then open it with Notepad2, in Settings -> Advanced Settings, change Rendering Technology to Legacy GDI, you will see most math symbols now rendered as boxes. |
…ob/master/emoji_pretty.json. This added 289 new emojis, issue #289.
I think the code is stable now, please test latest builds and check whether there are other bugs, or improvements better to have. |
Tested version CI#550. The \latex_input seems working as expected, except some quirk with disabling the "tab" in auto-completion. Enabling "tab" in auto-completion seems working as expected. Step to reproduce it.
For someone familiar with his/her symbol, typically would type the symbol_full_name instead of scrolling the drop-down (mouse or keyboard -> faster), and followed by tab. In this case, the \latex will remain as it is. Just wondering (still wondering) whether it is OK to make an exception/option (in auto-completion) for \latex. Other than that, just waiting for the upstream fix to have symbol/emoji dropdown. |
I'm wrong about disable Tab, so I made enable Tab (the default) works as expected, because I found that saved one key press: type a prefix, select one from auto-completion list, then press Tab to enter the corresponding symbol directly; press Enter or other keys to enter the selected name (which is useful in other situation). Show symbol/emoji will be implemented once the upstream issue fixed. |
The test version that I have used had "tab" enabled in auto-completion (default), which is OK. My earlier comment is confusing - my apology. Indeed, by tabbing, user can save key press. Personally, the current setup is OK. What I meant in earlier comment is if someone purposely/ accidentally un-check "tab" in auto-completion, then some quirky behaviour (Step 2 and 3) as described in that comment will appear. Below are the steps to reproduce it (copied from above).
For someone familiar with his/her symbol, typically would type the symbol_full_name instead of scrolling the drop-down (mouse or keyboard -> faster), and followed by tab. In this case, the \latex will remain as it is. Just wondering (still wondering) whether it is OK to make an exception/option (in auto-completion) for \latex. <- Enhancement?? |
Implemented by db2a834, when LaTeX input method is enabled, pressing Tab will always trying to convert text before caret into corresponding symbol/emoji. |
Tested CI #552. \latex and :smiley are working as expected. This is great. Thank you. |
…irectly to avoid extra UTF-32 to UTF-16 conversion, issue zufuliu#289.
…mpletion completed with Tab key, issue zufuliu#289.
…ob/master/emoji_pretty.json. This added 289 new emojis, issue zufuliu#289.
…ethod is enabled, issue zufuliu#289.
In Atom, particularly Juno, special character, e.g. beta (β) could be entered into the editor with "\beta", followed by "tab". Is this do able in notepad2?
The text was updated successfully, but these errors were encountered: