I thought maybe instead it could be activated whenever the return key is pressed but couldn't figure out how to use the on_query_context function. Here is my plugin code:
- Code: Select all
import sublime, sublime_plugin
class mykeIndent(sublime_plugin.EventListener):
def on_pre_save(self, view):
edit = view.begin_edit()
view.run_command('unexpand_tabs', {"set_translate_tabs": True})
view.end_edit(edit)
Thanks!