Jump to content

External Editors?


You are about to reply to a thread that has been inactive for 171 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

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.

  • Like 1
Link to post
Share on other sites

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 by SeanMcDonald
Typo
Link to post
Share on other sites
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 post
Share on other sites

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 by Rolig Loon
Link to post
Share on other sites
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.

  • Like 2
  • Thanks 1
Link to post
Share on other sites

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 by DoteDote Edison
Link to post
Share on other sites
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

  • Like 1
Link to post
Share on other sites

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 post
Share on other sites
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 post
Share on other sites

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 post
Share on other sites

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

  • Like 1
Link to post
Share on other sites
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 post
Share on other sites
You are about to reply to a thread that has been inactive for 171 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...