autoload/splicelib/settings.py @ 83293407b6f8

Update changelog
author Steve Losh <steve@stevelosh.com>
date Sat, 08 Oct 2016 12:47:20 +0000
parents 0013f7e01b6e
children (none)
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