autoload/threesomelib/settings.py @ d24125017d7f

Added tag v0.1.0 for changeset 1d6f4048a9b3
author Steve Losh <steve@stevelosh.com>
date Thu, 30 Jun 2011 18:20:25 -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