GManB Posted September 9, 2020 Share Posted September 9, 2020 Is there one or more external editors that are set up, of that I can set up, to write scripts? Any recommendations would be appreciated. I am most familiar with Emacs but open to others. Thanks, G Link to comment Share on other sites More sharing options...
Rolig Loon Posted September 9, 2020 Share Posted September 9, 2020 Several. See http://wiki.secondlife.com/wiki/LSL_Alternate_Editors . When this question appears every few months, there's usually a flurry of people naming their favorites. You can search past threads to find them and then compare with what folks say this time. My favorite remains Sublime Text, although I admit to using the simple editor in the viewer for a lot of quick and dirty scripting, especially when I just need a dozen lines of code to make something like a light switch or a gimme box to hand out a notecard. 1 Link to comment Share on other sites More sharing options...
Fritigern Gothly Posted September 9, 2020 Share Posted September 9, 2020 For the longest time I have used Kate as my external editor because that came with my desktop environment, but I too use Sublime Text now. And like Rolig, I use the built in editor for that simple stuff. Link to comment Share on other sites More sharing options...
SeanMcDonald Posted September 10, 2020 Share Posted September 10, 2020 (edited) In the past, I've used Nano with Kuraiko Yoshikawa's LSL syntax highlighter. It works well, although I also script on OpenSim, and it doesn't handle their extensions to LSL. A surprising find for me is that the Joplin app does an acceptable job highlighting and formatting LSL/OSSL code. It's my go-to editor these days. I'm also curious to see what other people are currently using. Edited September 10, 2020 by SeanMcDonald Typo Link to comment Share on other sites More sharing options...
GManB Posted September 10, 2020 Author Share Posted September 10, 2020 54 minutes ago, SeanMcDonald said: A surprising find for me is that the Joplin app does an acceptable job highlighting and formatting LSL/OSSL code. It's my go-to editor these days. Joplin looks interesting. How would i configure it to highlight lsl code? Link to comment Share on other sites More sharing options...
GManB Posted September 10, 2020 Author Share Posted September 10, 2020 A related question: Is there any way to import .lsl files into SL? So far all I have found on the forum is to cut-n-paste. Seems like a file upload would be available, what am I missing? G Link to comment Share on other sites More sharing options...
Rolig Loon Posted September 10, 2020 Share Posted September 10, 2020 (edited) If you use Sublime Text, every time that you use its Tools >> Build option to test your script, it automatically updates the in-world version that you have open at the time. My workflow typically involves creating a new script either in inventory or, more often, in the object that I am scripting and then clicking the script's EDIT button to open Sublime Text. As I edit and then BUILD, my updates are continually made to the script in SL. Edited September 10, 2020 by Rolig Loon Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted September 10, 2020 Share Posted September 10, 2020 1 hour ago, Rolig Loon said: If you use Sublime Text, every time that you use its Tools >> Build option to test your script, it automatically updates the in-world version that you have open at the time. My workflow typically involves creating a new script either in inventory or, more often, in the object that I am scripting and then clicking the script's EDIT button to open Sublime Text. As I edit and then BUILD, my updates are continually made to the script in SL. Simply saving the .lsl file with Ctrl-S will make the script compile in-world as well. 2 1 Link to comment Share on other sites More sharing options...
Rolig Loon Posted September 10, 2020 Share Posted September 10, 2020 2 minutes ago, Wulfie Reanimator said: Simply saving the .lsl file with Ctrl-S will make the script compile in-world as well. I had forgotten that. So much for habitual workflow. 2 Link to comment Share on other sites More sharing options...
DoteDote Edison Posted September 10, 2020 Share Posted September 10, 2020 (edited) I use Atom and it can also be linked to the in-world editor. To set an external editor, go to Advanced Menu->Show Debug Settings and type "externalEditor" in the upper space. In the lower space type the path to your installation plus "%s" like: C:\Users\<computer user name>\AppData\Local\atom\atom.exe "%s" Then, open a script and click the "Edit" button on the in-world script editor. The script will open in Atom (or whichever editor you choose) and still be linked to SL. So, when you save the script in the external editor, it's copied back to the in-world editor. Edited September 10, 2020 by DoteDote Edison Link to comment Share on other sites More sharing options...
GManB Posted September 10, 2020 Author Share Posted September 10, 2020 2 hours ago, Rolig Loon said: If you use Sublime Text, every time that you use its Tools >> Build option to test your script, it automatically updates the in-world version that you have open at the time. My workflow typically involves creating a new script either in inventory or, more often, in the object that I am scripting and then clicking the script's EDIT button to open Sublime Text. As I edit and then BUILD, my updates are continually made to the script in SL. Does Sublime Text highlight lsl keywords and function? G 1 Link to comment Share on other sites More sharing options...
GManB Posted September 10, 2020 Author Share Posted September 10, 2020 Sublime Text works great! Got it all set up to highlight and to edit from inworld and compile to inworld. Thanks, Rolig! G 2 Link to comment Share on other sites More sharing options...
Rolig Loon Posted September 10, 2020 Share Posted September 10, 2020 22 minutes ago, GManB said: Does Sublime Text highlight lsl keywords and function? G Yup. And it keeps track of matching brackets and parentheses. 1 Link to comment Share on other sites More sharing options...
Fritigern Gothly Posted September 10, 2020 Share Posted September 10, 2020 Another thing that I like about Sublime Text is that, as long as you don't close the tab, it "remembers" the last script(s) you have been working on, even if that script has been deleted in-world. It has saved my butt a few times already! I also use this feature to keep a tab with my LSL preprocessor macros and aliases open (that preprocessor is a feature of Firestorm ONLY) top help me remember in which ways I have tried to make my scripting life easier 😄 Link to comment Share on other sites More sharing options...
SeanMcDonald Posted September 12, 2020 Share Posted September 12, 2020 On 9/10/2020 at 10:57 AM, GManB said: Joplin looks interesting. How would i configure it to highlight lsl code? I just use code fencing like any language. I do copy-paste into the in-world editor, though, because that's the way my brain works. I'm suddenly not sure that it actually functions as an external editor that can compile code in-world. Link to comment Share on other sites More sharing options...
SophieJeanneLaDouce Posted September 15, 2020 Share Posted September 15, 2020 If anybody uses Microsoft Code for other things, it handles LSL just fine with an extension. It gives me the LSL keywords, functions, help text, etc. as with any other language. 1 Link to comment Share on other sites More sharing options...
Phate Shepherd Posted September 16, 2020 Share Posted September 16, 2020 I realize the OP and participants on this thread are on PCs, but if any Mac users come here, there is a trick to make it work. There is a bug in the way that Firestorm tries to open the temp .lsl file and the fix was found in a post from Kyle Linden on the jira: https://jira.secondlife.com/browse/BUG-227726 So, to use BBEdit as your external viewer, you manually put this into the external editor field of FS prefs or debug "External Editor" settings of the LL viewer: /usr/bin/open -a BBEdit.app %s There is a language file for BBEdit here: http://www.xmir.org/tech-talk/updated-lsl-language-module.html It is a little out of date, but it is easy to edit the .plist file and add in any missing LSL commands or constants. Link to comment Share on other sites More sharing options...
GManB Posted September 16, 2020 Author Share Posted September 16, 2020 Phate, THANKS! I am on a Mac and using Sublime Text and I had a slightly different command in the External Editor settings. I was getting a new instance of the editor for each file for which I selected 'Edit' inworld. And things were getting confusing to say the least. I tried your suggestion, /usr/bin/open -a "Sublime Text" %s, and things are better. I get only one instance of Sublime Text but each file goes into a different window not just a new tab. I can move the tab of, say, the second file I open to the window of the first and the tab does move over and the second window closes. Not bad. I'd rather have the second and more files just create a new tab in the existing window. But, much better than the behavior I had before. THANKS!! G 1 Link to comment Share on other sites More sharing options...
Phate Shepherd Posted September 16, 2020 Share Posted September 16, 2020 2 hours ago, GManB said: Phate, THANKS! I am on a Mac and using Sublime Text and I had a slightly different command in the External Editor settings. I was getting a new instance of the editor for each file for which I selected 'Edit' inworld.... G I hear yah! BBEdit was even worse... it would open a separate instance for each click of Edit, but wouldn't open the file. TextEdit would just say the file had bad permissions. I hadn't tried Sublime. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now