Did you try going to options, Text Editor, HTML/XML, HTML specific? There is some options about formatting there. There is also an option to keep it from automatically filling in the ending tag, I assumed that is what you need from your example, if that is not what you want sorry :).