- Is there a way to re-indent the code?
- Is there a shortcut to "find next", like Apple-G on OSX?
Select a multi-line block of text in the editor, then use [ Tab ] to indent, or [ Shift ] + [ Tab ] to un-indent.
[ Ctrl ] + [ G ] will find the next match, if a search has previously been made using [ Ctrl ] + [ F ]. You can also simply continue pressing [ Return ] in the find box, after entering a keyword.
Refer to Editor&Terminal.txt in the scripting documentation for a full list of available shortcuts.
The other stuff you mentioned is a bit more tricky.
In general, there are no observables to keep track of changes happening at the file system level. We do have observables such as renoise.tool().app_new_document_observable (called whenever a new song is created, or an existing song is loaded) and renoise.tool().app_saved_document_observable, so your tool could listen to those and know when to check the song's file name, path, etc., in order to update its internal state. More details in Renoise.ScriptingTool.API.lua
Anything related to the currently loaded song's file name and path is pretty much read-only, and can only be changed indirectly by re-saving the song under a different file name and path.
You could in theory rename the XRNS file directly in the file system, but Renoise will not do anything special in response to this -- your tool will still need to re-load the song from its new location. Take a look at Lua.Standard.API.lua to read about the various os.* functions you can use to access and manipulate files, directories, and so on.
There's no default song path, so you'll have to take care of this yourself, and prompt the user to define one when necessary. You can use renoise.app():prompt_for_path(dialog_title) to let the user pick a directory. More details in Renoise.Application.API.lua