#NEWLINE# def run( self , edit ) : #NEWLINE# #INDENT# window = self . view . window ( ) #NEWLINE# view = window . active_view ( ) #NEWLINE# for region in self . view . sel ( ) : #NEWLINE# #INDENT# if region . empty ( ) : #NEWLINE# #INDENT# selection = sublime . Region ( 0 , self . view . size ( ) ) #NEWLINE# self . replace_region_with_formatted_sql ( edit , selection ) #NEWLINE# self . view . set_syntax_file ( 'Packages/SQL/SQL.tmLanguage' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . replace_region_with_formatted_sql ( region , region )