autoload/splicelib/settings.py @ 062b18eebd15

Fix broken url
author Jof Arnold <JofArnold@users.noreply.github.com>
date Sun, 03 Sep 2017 14:10:51 +0100
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