 import vim <EOL> def focus ( winnr ) : <EOL> vim . command ( '<STR_LIT>' % winnr ) <EOL> def close ( winnr ) : <EOL> focus ( winnr ) <EOL> vim . command ( '<STR_LIT>' ) 
 def close_all ( ) : 
 import vim <EOL> def focus ( winnr ) : <EOL> vim . command ( '<STR_LIT>' % winnr ) <EOL> def close ( winnr ) : <EOL> focus ( winnr ) <EOL> vim . command ( '<STR_LIT>' ) <EOL> def close_all ( ) : <EOL> for winnr in range ( len ( vim . windows ) - <NUM_LIT:1> ) : <EOL> close ( winnr ) <EOL> def split ( ) : <EOL> vim . command ( '<STR_LIT>' ) <EOL> def vsplit ( ) : <EOL> vim . command ( '<STR_LIT>' ) <EOL> def currentnr ( ) : <EOL> return int ( vim . eval ( '<STR_LIT>' ) ) <EOL> def pos ( ) : <EOL> return vim . current . window . cursor <EOL> class remain : <EOL> def __enter__ ( self ) : <EOL> self . curwindow = currentnr ( ) <EOL> self . pos = pos ( ) <EOL> def __exit__ ( self , type , value , traceback ) : <EOL> focus ( self . curwindow ) <EOL> vim . current . window . cursor = self . pos </s>
