commands.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:sublime-text-3-packages 作者: nickjj 项目源码 文件源码
def run(self):
        """Run the command."""
        base_path = os.path.join(sublime.packages_path(), 'User', '*.tmTheme')
        sublime_path = os.path.join(sublime.packages_path(), 'User', 'SublimeLinter', '*.tmTheme')
        themes = glob(base_path) + glob(sublime_path)
        prefs = sublime.load_settings('Preferences.sublime-settings')
        scheme = prefs.get('color_scheme')

        for theme in themes:
            # Ensure it is a (SL) theme and it is not current current scheme
            if re.search(r'\(SL\)', theme) and os.path.normpath(scheme) not in theme:
                persist.debug('deleting {}'.format(os.path.split(theme)[1]))
                os.remove(theme)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号