#NEWLINE# def assign( seq , modes , * args , **kwargs ) : #NEWLINE# #INDENT# "\n    Registers a 'key sequence' to 'command' mapping with Vintageous.\n\n    The registered key sequence must be known to Vintageous. The\n    registered command must be a ViMotionDef or ViOperatorDef.\n\n    The decorated class is instantiated with `*args` and `**kwargs`.\n\n    @keys\n      A list of (`mode:tuple`, `sequence:string`) pairs to map the decorated\n      class to.\n    " #NEWLINE# def inner( cls ) : #NEWLINE# #INDENT# for mode in modes : #NEWLINE# #INDENT# mappings [ mode ] [ seq ] = cls ( * args , ** kwargs ) #NEWLINE# #UNINDENT# return cls #NEWLINE# #UNINDENT# return seq