-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prefix on save #65
Prefix on save #65
Conversation
def get_setting(self, key): | ||
settings = self.view.settings().get('Autoprefixer') | ||
@staticmethod | ||
def get_setting(view, key): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better to just make this a top-level function instead of a class method.
Nice! Thanks for working on this :) |
Glad to help :) just pushed a fix according to your comments. Is that more what you had in mind for the |
return settings.get(key) | ||
|
||
def is_css(view): | ||
return view.settings().get('syntax') == 'Packages/CSS/CSS.tmLanguage' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, in latest dev version of Sublime, it's Packages/CSS/CSS.sublime-syntax
. So I guess we should only check the file name (not path) without extension.
…ime-syntax format and old .tmLanguage syntax files)
Only check the filename, not path, just in case the path changes in the future. We really only care about the filename. |
Uses
on_pre_save
event to run autoprefix command on files with.css
extension.Add field in
Autoprefixer.sublime-settings
:Fixes #2.