1. Go into Minecraft, and put a diamond sword in your inventory, then Save & Exit.
2. Load up NBTEdit. Open your level.dat in your Minecraft save.
3. For the path to the sword, click Data, then Player, then Inventory, and it should be the first one.
4. With the whatever entries thing clicked, go to the top and add a Compound. Call it tag.
5. Add a compound within tag, called display.
Now these next 2 parts will show you how to add the custom text.
6a. (for the name of weapon). With display selected, go up to the top and add a String. Call it Name. Then double click it to edit the value. Put in whatever you want to call it. Use these codes to add colors (
http://www.minecraftwiki.net/wiki/Formatting_codes ).
6b. (for extra lines). This one I had to fiddle around with. Okay, so with display selected, go up to the top and go to List --> String. Call the list Lore. Then just add strings under that to add new lines, and you can color those too.
TADA! If you are struggling or need help, just ask.