autoload/threesomelib/settings.py @ e74f19c88d7e

Added tag v0.1.1 for changeset 17831680bc89
author Steve Losh <steve@stevelosh.com>
date Fri, 02 Sep 2011 09:36:27 -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