<s> """<STR_LIT:U+0020>""" <EOL> from pygments . lexers import get_lexer_for_filename <EOL> from vyapp . plugins . syntax . tools import * <EOL> from vyapp . plugins . syntax . keys import PRECEDENCE_TABLE , DEFAULT <EOL> from vyapp . exe import exec_quiet <EOL> def install ( area , theme , max = <NUM_LIT:10> ) : <EOL> """<STR_LIT:U+0020>""" <EOL> def update_scheme ( ) : <EOL> lexer = None <EOL> try : <EOL> lexer = get_lexer_for_filename ( area . filename , '<STR_LIT>' ) <EOL> except Exception : <EOL> return <EOL> TAG_KEYS_PRECEDENCE = PRECEDENCE_TABLE . get ( tuple ( lexer . aliases ) , DEFAULT ) <EOL> index0 = area . index ( '<STR_LIT>' ) <EOL> index0 = area . index ( '<STR_LIT>' % ( index0 , max ) ) <EOL> index0 = area . tag_next_occur ( TAG_KEYS_PRECEDENCE , index0 , '<STR_LIT>' , '<STR_LIT:1.0>' ) <EOL> index1 = '<STR_LIT>' % ( area . winfo_height ( ) , area . winfo_width ( ) ) <EOL> index2 = area . index ( index1 ) <EOL> index2 = area . index ( '<STR_LIT>' % ( index1 , max ) ) <EOL> index2 = area . tag_prev_occur ( TAG_KEYS_PRECEDENCE , index2 , '<STR_LIT>' , '<STR_LIT:end>' ) <EOL> for ind in theme . styles . iterkeys ( ) : <EOL> area . tag_remove ( str ( ind ) , index0 , index2 ) <EOL> colorize ( area , lexer , theme . styles , index0 , index2 ) <EOL> def start_scheme ( ) : <EOL> lexer = None <EOL> try : <EOL> lexer = get_lexer_for_filename ( area . filename , '<STR_LIT>' ) <EOL> except Exception : <EOL> return <EOL> colorize ( area , lexer , theme . styles , '<STR_LIT:1.0>' , '<STR_LIT:end>' ) <EOL> area . install ( ( - <NUM_LIT:1> , '<STR_LIT>' , lambda event : start_scheme ( ) ) , <EOL> ( - <NUM_LIT:1> , '<STR_LIT>' , lambda event : update_scheme ( ) ) ) <EOL> setup_theme_scheme ( area , theme ) </s>
