示例#1
0
文件: utils.py 项目: Acathur/sublime
def set_variable(name, value):
    voc = zen_resources.get_vocabulary('user') or {}
    if 'varaibles' not in voc:
        voc['variables'] = {}

    voc['variables'][name] = value
    zen_resources.set_vocabulary(voc, 'user')
示例#2
0
def set_variable(name, value):
    voc = zen_resources.get_vocabulary('user') or {}
    if 'varaibles' not in voc:
        voc['variables'] = {}

    voc['variables'][name] = value
    zen_resources.set_vocabulary(voc, 'user')
示例#3
0
def load_settings(force_reload=False):
    if not zcr.user_settings or force_reload:
        my_zen_settings = zen_settings.get('my_zen_settings')

        if my_zen_settings is not None:
            debug('loading my_zen_settings from zen-settings.sublime-settings')
            zcr.set_vocabulary(my_zen_settings, zcr.VOC_USER)
            assert zcr.vocabularies[zcr.VOC_USER] is my_zen_settings
示例#4
0
def load_settings(force_reload=False):
    if not zcr.user_settings or force_reload:
        my_zen_settings = zen_settings.get('my_zen_settings')

        if my_zen_settings is not None:
            debug('loading my_zen_settings from zen-settings.sublime-settings')
            zcr.set_vocabulary(my_zen_settings, zcr.VOC_USER)
            assert zcr.vocabularies[zcr.VOC_USER] is my_zen_settings