autoload/threesomelib/settings.py @ cefc901de8a2

Factor out a bunch of stuff into autoload/.
author Steve Losh <steve@stevelosh.com>
date Tue, 28 Jun 2011 17:48:57 -0400
parents plugin/threesomelib/settings.py@b9e75c5a9f2c
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