Created
October 28, 2012 07:58
-
-
Save mixflame/3968012 to your computer and use it in GitHub Desktop.
Sublime Text 2 Format Any Ruby File on Save Plugin by jsilver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# place in Packages/User/ | |
# recommend with trim trailing whitespace and sublimelinter | |
import sublime_plugin, re | |
class rubyCheck(sublime_plugin.EventListener): | |
def on_pre_save(self, view): | |
if re.search("Ruby", view.settings().get('syntax')): | |
view.window().run_command("ruby_format") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment