I recommend using
XML Notepad for making these kind of changes. With that, you can drag nodes (representing fields, along with their captions and formatting) to rearrange them. You can still make mistakes, but it's less likely you'll mess up the code doing that way.