<s> from pyvi import window <EOL> from pyvi . modes import normal <EOL> class Editor ( object ) : <EOL> _command = None <EOL> active_tab = None <EOL> def __init__ ( self , tabs = None , config = None , normal = normal ) : <EOL> self . config = config <EOL> self . mode = self . normal = normal <EOL> self . count = None <EOL> if tabs is None : <EOL> tabs = self . tabs = [ window . Tab ( self ) ] <EOL> else : <EOL> tabs = self . tabs = list ( tabs ) <EOL> if tabs : <EOL> self . active_tab = tabs [ <NUM_LIT:0> ] <EOL> @ property <EOL> def active_window ( self ) : <EOL> return self . active_tab . active_window <EOL> def keypress ( self , keys ) : <EOL> return self . mode . keypress ( self , keys ) </s>
