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

Allow 'update on save' to work on .txt files, and allow this to be customised in settings #169

Open
0xdevalias opened this issue Dec 10, 2023 · 0 comments

Comments

@0xdevalias
Copy link

Purpose

Currently update on save happens for 'Markdown' files:

Which is defined as:

How important it is

Would be pretty useful.

Ideal implementation

Being able to configure what extensions/file types the 'update on save' works on in the package settings would make the most sense to me.

.txt doesn't need to be added as a default, but being able to manually configure it would be helpful.

Currently this list seems to be hardcoded in markdowntoc/autorunner.py:

class AutoRunner(sublime_plugin.EventListener):
def on_pre_save(self, view):
# limit scope
root, ext = os.path.splitext(view.file_name())
ext = ext.lower()
if ext in [".md", ".markdown", ".mdown", ".mdwn", ".mkdn", ".mkd", ".mark", ".mdx"]:
view.run_command("markdowntoc_update")

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