Skip to content

Idea: Dynamic Snippets For /newcommand(s) Defined In File #43

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

Open
michaelfortunato opened this issue Feb 19, 2025 · 0 comments
Open

Idea: Dynamic Snippets For /newcommand(s) Defined In File #43

michaelfortunato opened this issue Feb 19, 2025 · 0 comments

Comments

@michaelfortunato
Copy link

I often create a few \newcommand(s) in the current tex file I am working on.
I was thinking a cool feature could be to create a snippet that would read the \newcommand it found in the current file and expand to one of them.

For instance, say I have the tex file with two \newcommand(s) defined.

% ...
\newcommand{\plusbinomial}[2]{(#1 + #2)^2}
\newcommand{\z}[1]{W^{\[#1\]}\a^\{#1 - 1\} + b^\{#1\}}
% ...

It would be cool if I could type cmd1, and have a snippet that expands to \plusbinomial{}{} and cmd2 expand to \z{}.

@michaelfortunato michaelfortunato changed the title Idea: Dynamic Snippets For /newcommand(s) defined in file Idea: Dynamic Snippets For /newcommand(s) Defined In File Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant