def set(name, value):
    """To set a vim variable to a given value."""
    if isinstance(value, basestring):
        val = "'{0}'".format(value)
    elif isinstance(value, bool):
        val = "{0}".format(1 if value else 0)
    else:
        val = value

    vim.command("let {0} = {1}".format(prefix + name, val))
dataset/ETHPy150Open chautoni/tube.vim/autoload/tube/utils/settings.py/set/original