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

User extensible postfixes #3466

Closed
anneborcherding opened this issue Feb 26, 2024 · 12 comments · Fixed by #3573
Closed

User extensible postfixes #3466

anneborcherding opened this issue Feb 26, 2024 · 12 comments · Fixed by #3573
Assignees
Labels
enhancement New feature or (non bug related) change to the program.
Milestone

Comments

@anneborcherding
Copy link

I was wondering whether it would be possible to make the postfixes that come with the plugin extensible by the user. I wanted to add some more postfixes, but was not able to, even though I can see the LaTeX postfixes in the list (see screenshot below).

grafik

Is there a way to achieve this already that I haven't seen?

@anneborcherding anneborcherding added enhancement New feature or (non bug related) change to the program. untriaged Issue type still needs to be triaged or verified. labels Feb 26, 2024
@PHPirates PHPirates removed the untriaged Issue type still needs to be triaged or verified. label Feb 26, 2024
@PHPirates
Copy link
Collaborator

Thanks for the suggestion! No, I don't think it is possible at the moment, but it looks like it should be possible to provide adding/editing of postfix templates using live templates syntax.

@anneborcherding
Copy link
Author

That would be really nice! I would really enjoy to add my own postfixes which represent the options / commands that I am using the most.

@fberlakovich
Copy link
Contributor

If you are willing to install another plugin, the https://plugins.jetbrains.com/plugin/9862-custom-postfix-templates plugin has an integration with Texify-IDEA (its only mentioned with one sentence at https://hannah-sten.github.io/TeXiFy-IDEA/code-completion.html#postfix-code-completion). Here is an example of a template I use

.proper : latex propername
    TEXT → \propername{$expr$}$END$

@PHPirates
Copy link
Collaborator

Oh yes, I completely forgot you added LaTeX support to that plugin! Maybe I should have read my own documentation :)

@anneborcherding
Copy link
Author

Thank you! I actually tried to use this plugin before opening this issue but was not successful 😅 I tried it again with the example by @fberlakovich above, but still have the issue that the plugin does not load the file contents correctly (aka doesn't load anything). Do you have any suggestions what I might want to change for this to work?

grafik

This is the content of my file:

.proper : latex propername
    TEXT → \propername{$expr$}$END$

@fberlakovich
Copy link
Contributor

How did you create the template file? For me, the plugin behaved weirdly when I tried to add a template via the Shift+Alt+P shortcut (it would sometimes show an error message that postfix templates are not supported for text or something). In the end I added a new template file directly in the settings dialog in your screenshot. For reference, this is how it looks like on my machine
image

@fberlakovich
Copy link
Contributor

Also seems like other people have a similar issue: xylo/intellij-postfix-templates#220, but at least there seems to be a workaround

@anneborcherding
Copy link
Author

Thanks for pointing me to that repo (could've thought of this myself). I found a workaround and now it works for me as well, thanks again!

@fberlakovich
Copy link
Contributor

@anneborcherding @PHPirates I guess we can close this issue?

@PHPirates
Copy link
Collaborator

We could, though I think it might still be a good idea to implement a very simple default editor (https://plugins.jetbrains.com/docs/intellij/advanced-postfix-templates.html#editable-postfix-templates)

@anneborcherding
Copy link
Author

So for my concrete use case, I found a solution, but I agree with @PHPirates that an editor would be a great enhancement!

@fberlakovich
Copy link
Contributor

We could, though I think it might still be a good idea to implement a very simple default editor (https://plugins.jetbrains.com/docs/intellij/advanced-postfix-templates.html#editable-postfix-templates)

You mean in addition to the one the custom postfix template plugin already provides? Iirc it has an editor, there just seems to be a bug that it doesn't always open when it should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or (non bug related) change to the program.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants