plugin/threesomelib/settings.py @ 566ffcc452e2

Added tag v0.0.7 for changeset d13a0763f1b0
author Steve Losh <steve@stevelosh.com>
date Mon, 13 Jun 2011 21:49:25 -0400
parents 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