Skip to content

Instantly share code, notes, and snippets.

@rlmattax
Created September 9, 2013 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rlmattax/6500450 to your computer and use it in GitHub Desktop.
Save rlmattax/6500450 to your computer and use it in GitHub Desktop.
import sublime, sublime_plugin, os
class ExpandTabsOnSave(sublime_plugin.EventListener):
# Run ST's 'expand_tabs' command when saving a file
def on_pre_save(self, view):
if view.settings().get('expand_tabs_on_save') == 1:
view.window().run_command('expand_tabs')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment