Skip to content

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

Open
@0xdevalias

Description

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")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions