autoload/splicelib/settings.py @ ad486b938451

fix whitespace, fix numbering
author killphi <killphi@gmx.de>
date Mon, 16 Sep 2013 12:26:50 +0200
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