Popup for quick and easy insertion of symbols inside math environments#1111
Closed
r-stein wants to merge 6 commits intoSublimeText:version4from
Closed
Popup for quick and easy insertion of symbols inside math environments#1111r-stein wants to merge 6 commits intoSublimeText:version4from
r-stein wants to merge 6 commits intoSublimeText:version4from
Conversation
Contributor
|
Great idea @r-stein ! This is something I also considered a while back. TeXmacs has a similar mechanism, except that (i) substitution happens automatically, so e.g. you get a The implementation would be quite different from what you have---I'm just mentioning this as something to keep in mind. The main user-facing difference is that TeXmacs is completely WYSIWYG, so you actually get a nice, typeset arrow when you enter |
# Conflicts: # Default.sublime-keymap
This will just insert the sequence and omit the popup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a popup, which can be used to insert symbols and operators inside math environments. The basic idea is to use an input method, which is as intuitive as possible, but is still useful for advanced users, who just want it to be fast. You press the trigger key and then write the trigger for the corresponding symbol. The trigger tries to emulate the appearance of the resulting symbol, e.g.
aforα,->for→,-->for⟶, and|->for↦.If the prefix only matches one remaining symbol it will be inserted automatically otherwise you use up/down to select one and tab/enter/space to insert it.
The triggers and corresponding commands are written in a JSON file and user configureable. Even after changes the preview (2nd column) should also be good, because I wrote a small LaTeX to html converter, which knows a lot of symbols (by a yaml meta data file) and understands the basic commands.
Add this to your keymap to create a trigger key (change the key to the one you wish to use):
(The image problems in this gif are due to the gif record program, not ST or this plugin)

This is still a beta version and I will need to change several things, before we can release it