| Live coding environments typically include a text editor. Sometimes as in the case of Praxis, its possible to change the behaviour of the text editor while you use it. https://github.com/createuniverses/praxis I wrote it for myself mainly, so a lot of the features are undocumented and hidden away. But you can have a look at fnkeys.lua, editor.lua and keymap.lua to get a general idea. These are in prods/syntax2015continued. You can bring these up in praxis and make whatever changes you like to the live system. I like the idea of making it keyboard and buffer driven to an extreme, like the Commodore 64. For example, one simple technique I like is to "inject" code into the current buffer to place objects: function makeCamPosSaver()
local x,y,z = getCamPos()
x = math.floor(x)
y = math.floor(y)
z = math.floor(z)
local s = "setCamPos("..x..","..y..","..z..")"
print2(s)
end
Then calling makeCamPosSaver injects a bit of code that will move the camera back where it was when you called it.Another example: pressing F3 creates a new buffer where you are supposed to fill in a string with what you are searching for. When you run that buffer, it will switch to the old one that spawned it, and move the cursor to the next occurrence of the search string. There are more creative ways to use this that others could come up with I'm sure. |