import sublime_plugin class SetUnixLineEnding(sublime_plugin.EventListener): def on_pre_save(self, view): view.set_line_endings("unix")