autoload/threesomelib/settings.py @ c3f318a26db2

Add gauge.
author Steve Losh <steve@stevelosh.com>
date Tue, 10 Apr 2012 10:19:23 -0400
parents cefc901de8a2
children (none)
import vim


def setting(name, default=None):
    full_name = 'g:threesome_' + 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