I use Edit Plus. You can get syntax libraries for WoW LUA and more. And it's free.

I keep a master copy of the general macros and then master copies of the class macros. then I place where I need them.

I don't think an off line editor would work for making macros while you play. The macros get written to memory and WoW will overwrite changes you made when you log out. That has been my experience anyway. I think you would have to inject the macros somehow and that could get you in trouble with Warden.