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

Enable/disable #8

Open
clnhlzmn opened this issue Sep 10, 2020 · 2 comments
Open

Enable/disable #8

clnhlzmn opened this issue Sep 10, 2020 · 2 comments

Comments

@clnhlzmn
Copy link

I love your extension! I have also tried Calculate from Andrew Carreiro which is a similar idea. I prefer how Mathpad shows the results in real time without having to select the expression and run a command, but I would like to be able to use Mathpad on new, non-markdown, files and I would also like to be able to disable it when I am editing a markdown file. Do you have any idea how those changes could be made?

@sagebind
Copy link
Owner

Good question, I'm not sure that it would be feasible to toggle on a per-file basis, but it might be possible to have a list of file extensions where you can add and remove things from. This complicates extension activation though, since right now the extension doesn't get loaded until you open a Markdown file, for performance.

@clnhlzmn
Copy link
Author

What I was thinking was doing something like how Calculate does it. It contributes two commands ("calculate" and "calculate and replace"). You select the expression to calculate and use those commands to run the calculator. I was thinking it would be nice to replace those commands with something like "enable" and "disable". Mathpad would be disabled by default and if I want it to start evaluating expressions I would run the enable command which would enable calculations regardless of file type. I can add the commands easy enough, but looking at the code I can't see how I would actually cause Mathpad to enable or disable.

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

2 participants