Ingame Lua Editor?

Today I’ve taken up Lua and while finding it fairly easy, I am also finding the method I am using is far from ideal … (I’ve been saving and editing outside of gmod then opening/closing gmod each time to test stuff.)

What i was wondering is , is there an ingame editor for the console? Maybe like nano ?(Im from a more gnu/linux backround :P) Just something that would allow me to script without opening and exiting
everytime I want to test something.

Has this been done yet, and if not, why not? I’m guessing and hoping I just missed something…
Because I would think this would be like a given :L


There’s LuaPad, but you’re better off using notepad ++ and setting GMod to windowed mode.

Woah ho ho! , didn’t even think about putting it in windowed mode!
Thanks …

LuaPad works if you want quick testing but it saves as a .txt in your data folder. So once you are done testing you can copy and paste it into a .lua file into the right spot.

I window mode all source games. I’m a alt-tabber-aholic.

Looks like I’m going the windowed route! I don’t get why LuaPad wouldn’t save .lua’s though …

Because you can’t file.Write Lua files. If you could then people could write malicious scripts and whatnot.

Ehhhh I guess so. :confused:
Oh well.

Quick tip: You don’t need to open/close GMod every time. If you don’t use LuaPad, you can just reload the map. Garry’s Mod will reload lua and all of your files every time you do so.


Everything accept addons. Addons are loaded when gmod loads.

Addon content can be refreshed with a mapchange as long as the addon is already registered.

Er, yeah. I should have worded my reply better.
You just can’t load NEW addons or something (installed while the game is running) without restarting the client.

– SNIP temporary brain fart – another good utility to have is lua_reloadent,

I love lua_reloadent <3

For simple lua files you can just to lua_openscript though. Presuming the addon directory is not new (since gmod start).

If coding a gamemode you can use gamemode_reload, it doesn’t break anything except for animations, obviously use that command if you’re coding a gamemode.