1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
import vim def setting(name, default=None): full_name = 'g:splice_' + name if not int(vim.eval('exists("%s")' % full_name)): return default else: return vim.eval(full_name) def boolsetting(name): if int(setting(name, 0)): return True else: False