<s> import vim <EOL> from bufferlib import buffers <EOL> from . . settings import setting <EOL> def bind ( key , to , options = '<STR_LIT>' , mode = None , leader = None ) : <EOL> if not leader : <EOL> leader = setting ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> vim . command ( '<STR_LIT>' % ( options , leader , key , to ) ) <EOL> def unbind ( key , options = '<STR_LIT>' , leader = None ) : <EOL> if not leader : <EOL> leader = setting ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> vim . command ( '<STR_LIT>' % ( options , leader , key ) ) <EOL> def bind_for_all ( key , to , options = '<STR_LIT>' , mode = None , leader = None ) : <EOL> if not leader : <EOL> leader = setting ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> with buffers . remain ( ) : <EOL> for b in buffers . all : <EOL> b . open ( ) <EOL> bind ( key , to , options , mode , leader ) <EOL> def unbind_for_all ( key , options = '<STR_LIT>' , leader = None ) : <EOL> if not leader : <EOL> leader = setting ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> with buffers . remain ( ) : <EOL> for b in buffers . all : <EOL> b . open ( ) <EOL> unbind ( key , options , leader ) </s>
