#NEWLINE# def run( self , edit ) : #NEWLINE# #INDENT# pt = self . view . sel ( ) [ 0 ] . begin ( ) #NEWLINE# if utils . get_setting ( 'cfml_auto_insert_closing_tag' ) : #NEWLINE# #INDENT# tag_name = utils . get_tag_name ( self . view , pt ) #NEWLINE# if tag_name : #NEWLINE# #INDENT# is_custom_tag = self . view . match_selector ( pt , 'meta.tag.custom.cfml' ) #NEWLINE# if is_custom_tag : #NEWLINE# #INDENT# closing_custom_tags = utils . get_closing_custom_tags_by_project ( self . view ) #NEWLINE# has_closing_tag = ( tag_name in closing_custom_tags ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# cfml_non_closing_tags = utils . get_setting ( 'cfml_non_closing_tags' ) #NEWLINE# has_closing_tag = ( tag_name not in cfml_non_closing_tags ) #NEWLINE# #UNINDENT# if has_closing_tag : #NEWLINE# #INDENT# next_char = utils . get_next_character ( self . view , pt ) #NEWLINE# tag_close_search_region = self . view . find ( ( ( '</' + tag_name ) + '>' ) , pt ) #NEWLINE# if ( next_char != tag_close_search_region . begin ( ) ) : #NEWLINE# #INDENT# self . view . run_command ( 'insert_snippet' , { #NEWLINE# #INDENT# 'contents' : ( ( '>$0</' + tag_name ) + '>' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# return #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# self . view . run_command ( 'insert_snippet' , { #NEWLINE# #INDENT# 'contents' : '>' , #NEWLINE# #UNINDENT# } )