For people who do not have such a feature in their lua editors, this small program will parse through lua that has been copied to the clipboard and use a series of RegEx commands to automatically insert the correct amount of tabbing and replace the old clipboard contents with the new tabbed one.
I've tested this on all of my own addons as well as healbot/dbm/altaholic/auctionator (over 15,000 lines) and have had no issues, with that being said this is still not 100% bug free so it's possible it might not indent correctly in some strange cases.
Please leave a comment if you have any suggestions or to report a bug.
1.2 Fixed an error where "else" was adding an extra tab in certain cases.
1.1 Fixed an issue where user tabbing after the start of the line was being removed.