Often I end up with long scripts (1000 lines +) that are slow to navigate (counted in seconds but its still slow if you need to jump around a lot)
I dont want to split the script to multiple scripts because navigating would still be slow (need to go to a different script, which likely wont be open because they tend to close if you reopen the place/crash, as well as being forced to use some boilerplate to allow the scripts to interact with each other)
I thought it would be nice to have a small easy to use list that lists all the named functions within the script, and you can jump to them by clicking the name. It could be a drop down menu that opens if you hover a “functions” button or something.
Originally I thought of being able to place a bookmark on any line, but that requires effort from the scripter and is not really necessary since being able to jump to a function should be close enough to whatever line you are looking for.
It should find:
“function blah()
end”
and
“blah=function()
end”
even if the functions are inside tables or other functions, in which case the full name should be shown (myTable.myMethod.myLocalFunctionDeclaredWithinFunctionThingy)
Parameters should be included.
Benefits:
-Quicker navigation within big scripts
-Allow to see big picture since you can see all the functions in the order they appear
-Allow you to quickly check the parameters of some function you want to call (though this should probably be part of the intelligent-senser)
-Drive you into using more functions to make the code easier to navigate, which will probably improve code quality in most cases
[quote] I’ve been wondering why this wasnt part of the intel-sensor.
Can plugins read script source? We could make our own I guess… But this needs to be in vanilla studio [/quote]
Yeah, they can, and so can the Command bar:
print(scriptNameHere.Source)[/quote]
Then we COULD create a plugin that creates a bunch of RemoteFunctions in the DataModel somewhere to display what each script has available… But again, lets just make in vanilla
[quote] [quote=“GollyGreg” post=66506]I’ve been wondering why this wasnt part of the intel-sensor.
Can plugins read script source? We could make our own I guess… But this needs to be in vanilla studio [/quote]
Yeah, they can, and so can the Command bar:
print(scriptNameHere.Source)[/quote]
Then we COULD create a plugin that creates a bunch of RemoteFunctions in the DataModel somewhere to display what each script has available… But again, lets just make in vanilla[/quote]
Agreed, I script, but I’m still learning, and sometimes the scripts I go into are huge. It’s the biggest pain to find the ending of the function.
[quote] [quote=“CeaselessSoul” post=66628][quote=“GollyGreg” post=66506]I’ve been wondering why this wasnt part of the intel-sensor.
Can plugins read script source? We could make our own I guess… But this needs to be in vanilla studio [/quote]
Yeah, they can, and so can the Command bar:
print(scriptNameHere.Source)[/quote]
Then we COULD create a plugin that creates a bunch of RemoteFunctions in the DataModel somewhere to display what each script has available… But again, lets just make in vanilla[/quote]
Agreed, I script, but I’m still learning, and sometimes the scripts I go into are huge. It’s the biggest pain in the ass to find the ending of the function.[/quote]