<s> """<STR_LIT>""" <EOL> import vim <EOL> prefix = '<STR_LIT>' <EOL> def set ( name , value ) : <EOL> """<STR_LIT>""" <EOL> if isinstance ( value , basestring ) : <EOL> val = "<STR_LIT>" . format ( value ) <EOL> elif isinstance ( value , bool ) : <EOL> val = <NUM_LIT:1> if value else <NUM_LIT:0> <EOL> else : <EOL> val = value <EOL> vim . command ( "<STR_LIT>" . format ( prefix + name , val ) ) <EOL> def get ( name , type = None ) : <EOL> """<STR_LIT>""" <EOL> rawval = vim . eval ( prefix + name ) <EOL> if type is bool : <EOL> return False if rawval == '<STR_LIT:0>' else True <EOL> elif type is int : <EOL> return int ( rawval ) <EOL> elif type is float : <EOL> return float ( rawval ) <EOL> else : <EOL> return rawval </s>
