def single_tab(pl, segment_info, mode):
 return (len(list_tabpages()) == 1)

def single_tab ( pl , segment_info , mode ) : return ( len ( list_tabpages ( ) ) == 1 )
returns true if vim has only one tab opened .