-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
[FEATURE] Excluded environments for snippets #248
Comments
I agree, this would be a great feature. For example, using mhchem's arrows is very annoying since the plugin keeps autocompleting math inside Recording.2024-02-25.081846.mp4 |
@BobVarioa I'm thinking of writing a PR for this by either extending the auto-fraction options or building a system of entries. 1I will add a blacklist under Advanced Snippet Settings. Any environment written in the blacklist will have all snippets disabled unless the snippet has an The limitation with this approach is that you can't select specific snippets for specific environments. For instance, if you have certain snippets that you want to run in 2I add a dialog for the user to enter individual environments to blacklist. Each environment will have an associated dialog box where the user could add a custom option character to enable snippets in that environment. Example: I blacklist Which one do you think is the better approach? |
I think 2 is probably the better approach, as it's more gradual, i.e. people would only add things that annoy them, etc. |
Excluded environments are actually already implemented in code (see here), though currently the list of exclusions is fixed - there is no way for users to define custom exclusions for their snippets. What do you think about exposing this functionality to the user through an interface like this (as opposed to a dialog box)? {trigger: "->", replacement: "\\to", options: "mA", excluding: [["\ce{", "}"]]} |
@artisticat1 This would be perfect! That puts all the customization in one place, which is way simpler. |
@artisticat1 I encountered recently that the i want to enter inline code |
@sylph520 I don't think this feature has been implemented yet, though the bones are already there as artisticat said. We're waiting on them to add the feature. |
Description of the Problem
Its annoying when in environments where the syntax is different (e.g. ce, pu) the default snippets still run.
Description of the Solution
Either something like the current auto-fraction options to disable all snippets from running in certain environments or a new parameter for each snippet that lets you exclude (/ whitelist) certain environments.
The text was updated successfully, but these errors were encountered: