#NEWLINE# def run( self , edit , repeat = 1 ) : #NEWLINE# #INDENT# repeat = int ( repeat ) #NEWLINE# if ( repeat == 1 ) : #NEWLINE# #INDENT# re_brackets = re . compile ( '([(\\[{])|([)}\\])])' ) #NEWLINE# def move_to_next_bracket( pt ) : #NEWLINE# #INDENT# line = self . view . line ( pt ) #NEWLINE# remaining_line = self . view . substr ( sublime . Region ( pt , line . b ) ) #NEWLINE# match = re_brackets . search ( remaining_line ) #NEWLINE# if match : #NEWLINE# #INDENT# return ( ( pt + match . start ( ) ) + ( 1 if match . group ( 2 ) else 0 ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return pt #NEWLINE# #UNINDENT# #UNINDENT# transform_selection ( self . view , move_to_next_bracket , extend = True ) #NEWLINE# self . view . run_command ( 'move_to' , { #NEWLINE# #INDENT# 'to' : 'brackets' , #NEWLINE# 'extend' : True , #NEWLINE# 'force_outer' : True , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . move_by_percent ( repeat )