#NEWLINE# def on_pre_save( self , view ) : #NEWLINE# #INDENT# if ( view . settings ( ) . get ( 'ensure_newline_at_eof_on_save' ) == True ) : #NEWLINE# #INDENT# if ( ( view . size ( ) > 0 ) and ( view . substr ( ( view . size ( ) - 1 ) ) != '\n' ) ) : #NEWLINE# #INDENT# edit = view . begin_edit ( ) #NEWLINE# view . insert ( edit , view . size ( ) , '\n' ) #NEWLINE# view . end_edit ( edit )