autoload/splicelib/settings.py @ 61fde9091c13 v1.1.0

Unfuck the makefile for doc publishing
author Steve Losh <steve@stevelosh.com>
date Sat, 08 Oct 2016 13:08:50 +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