Boosting LaTex Productivity: Ideas for Expanding TeXiFy-IDEA with Advanced Snippets #3363
Replies: 5 comments 1 reply
-
Thanks for the suggestions! Any help in improving TeXiFy is very much appreciated.
I think we should not always do this replacement, because sometimes I do want to write
We have those already for a few selected cases, so not sure what you mean. Do you want them to be user-configurable? I did not go through the whole list of snippets, but indeed there might be some nice ideas in there. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the quick follow-up! I believe I've expressed myself poorly in my first message and would like to clarify. My post is not concerned with what I think should be the default behavior of TeXiFy-IDEA but rather how the end user could customize this behavior. Take, for example, fractions. I agree entirely that we shouldn't always replace However, if your goal is to write LaTeX as fast, if not faster, than by hand, then the current implementation of Live and Postfix templates isn't configurable enough. Continuing with the fraction example, if I would like to write Another issue I have with Live and Postfix Templates: they require an additional keypress to expand. A great example is Greek letters. There is no way for me to automatically replace
I would love to see it so users can customize this feature. I see notable uses with I understand that such a workflow is not everyone's cup of tea. However, I'm convinced that the boost in productivity far outweighs the time and effort to implement it. The question that remains is whether enough people would benefit from this to warrant making my project public and whether building on top of TeXiFy-IDEA is the best way to achieve this goal. I always have a hard time expressing tone through text. So please read this entire discussion as "hey, here is cool idea I have. Do you think this is the right way I should go about implementing it?" rather than "this is how things should be." Once again, thank you so much for your attention. |
Beta Was this translation helpful? Give feedback.
-
Thanks for you explanation. Regarding snippets, the question is how general do you want it to be. Indeed, live/postfix templates are very limited, and a full blown plugin is very general but also too much effort for the average user. https://plugins.jetbrains.com/docs/intellij/plugin-alternatives.html
Maybe there are examples already somewhere, not sure. Couldn't find it at plugin ideas: https://plugins.jetbrains.com/plugin-ideas In any case, if we are just talking about text replacements this is not specific to LaTeX I would say, so can be completely separate from TeXiFy. |
Beta Was this translation helpful? Give feedback.
-
Thank you once again for the help! I've been researching a bit on the alternatives you mentioned but didn't get too far. Would you have any recommendations on where I can start to learn about the subject and acquire the necessary skillset? I've found this link to the IntelliJ API, and this plugin that should allow me to interact with the IDE scripting console with Python, but I couldn't find any specific documentation/examples on either. I know this goes beyond the original scope of this discussion, but I would greatly appreciate any guidance. Best, |
Beta Was this translation helpful? Give feedback.
-
The LivePlugin seems to be older and more targeted towards light-weight plugin prototyping. I think the Flora plugin looks most promising for this use case: if you can create some examples on how to do e.g. text replacements, it should be quite easy to share and for other people to adapt those to their own desired scripts, without having to build a full plugin. When writing a Flora plugin you just use the regular intellij api. Indeed, to get more familiar with it you can follow the Intellij SDK devguide you already found, and look at examples from other plugins. If you are getting stuck with the Flora plugin might be easier to build a full plugin first, and then try to adapt it to a Flora script. |
Beta Was this translation helpful? Give feedback.
-
Hello! Hope everyone reading this is well.
As a STEAM researcher, a substantial fraction of my written production is based on LaTeX at some level. Hence, I started this discussion to share some ideas and get advice on the best way to use TeXiFy-IDEA.
For context, there are two tools I currently use for writing LaTeX. I use Obsidian for writing notes, and I use PyCharm's TeXiFy-IDEA to write LaTeX documents. PyCharm conveniently has GitHub Copilot Integration, which has proven very efficient in autocompleting LaTeX equations and environments with context awareness.
On the other hand, Obsidian has a potent plugin named LaTeX Suite that introduces snippets that substantially speed up the writing process. The plugin is based on Giles Castel's ideas on how to speed up LaTeX writing.
I've become increasingly fond of their snippets and decided to implement similar functionality in PyCharm to have a consistent workflow in all my environments. However, I discovered that PyCharm's Live Templates fall short of functionality and don't allow the same flexibility. For example, I couldn't implement automatic triggers, such as replacing
x/y
with\frac{x}{y}
. Another feature I miss is selection-aware replacements; for example, I can select an expression and pressB
to surround it automatically with the underset command.After experimenting with some alternatives like Espanso, I've decided to turn to this discussion page to ask for ideas. I'd imagine I'm not the only person that would benefit from this functionality. However, I'm unsure of the best approach to implementing it. Maybe I should work on a plugin that expands on TeXiFy-IDEA?
I'd love to hear everyone's two cents on the subject!
Best regards,
Carlos S.
Beta Was this translation helpful? Give feedback.
All reactions