Jump to content

Lua script editor (Scintilla)


AggrorJorn
 Share

Recommended Posts

First off I have been using Leadwerks for many years, using both Lua and C++. Many video tutorials were made using the integrated script editor. Till this day I find the scripting editor one of the biggest weaknesses of Leadwerks. As a matter of fact I prefer using Notepad++ or Visual studio code. Both are free, crossplatform and come with great working lua extensions that make life a little easier. Biggest downside to those editors: the absence of any debugging options.

 

The integrated editor (custom build of scintilla/Scite I assume, correct me if I am wrong.) has some annoying downsides that make usage cringeworthy:

  • Auto line indention of lines seem to fail most of the time. Pretty much every new line starts at the beggining of the line rather then adding tabs or indention. The amount of time lost on correctly positioning the cursor is insane and the biggest frustration on my end.
  • Absence of Ctrl + arrow to jump between words: jumping between words using the control + arrow keys does not work. This even works in non code editor programs like word or even when typing in a url in the browser.
  • Absence of copy line functionality: Granted, the shortcut key is different for every IDE, but the prinicipal is the same: when the shortcut is pressed, the current line the cursor is on, is copied to the line below. (Visual studio has ctrl + c, Notepad has control + d)
  • Another point that is not working properly is the removal or saving of break points. Sometimes the debugger stops at break points that are no longer there.
  • The ability to turn of 'show editor' on front when the Leadwerks editor becomes acticve. If I use the integrated editor, I moves it to my second screen (Leadwerks editor stays on the first screen). When I look up something in a webbrowser and switch back to the LE editor, the script editor also becomes active. This is more often than not, unwanted behaviour. A checkbox in the editor options would be nice a nice to have.

 

These 4 alone cause many annoyances in my work process. Even though I use external editors for most of the typing, when it comes to debugging, I have to switch to the integrated editor.

 

 

As a side note some remarks on more 'luxurious' script editor options:

  • Maybe this is a personal thing but the autocompletion often not accepts the spacebar to except the highlighted word. Instead you have to press enter for it to work. Maybe this is something I can address in a settng somewhere, but it feels not as great as the autocompletion options in other IDE's.

What are your experiences with the integrated script editor?

  • Upvote 5
Link to comment
Share on other sites

The ctrl-arrow thing drives me nuts! That's my primary means of navigation and it gets me every single day. :)

 

At one point josh posted the network code to the debugging but I didn't have much time and he didn't provide any details on it so I didn't do anything with it. If he provides more context around that and then provides a way to launch our own editor from the le editor then we could make things more flexible by doing our own integrations. The lua editor is not what makes le special and if anything holds it back. It's not a joy to work with and if he helped this community with just information around the debugging and the ability to plug in our own editor exe it would go a long way with minimal effort on his side.

 

Make it happen josh!

  • Upvote 3
Link to comment
Share on other sites

The ctrl-arrow thing drives me nuts! That's my primary means of navigation and it gets me every single day

 

totally agree, i'm just fan of crtl left/right, auto indentation and many other helper thing's we usually has on editors

 

(i came from the Ctrl+K+AnotherNiceKey era!, when a mouse simply were a strange thing)

Paren el mundo!, me quiero bajar.

Link to comment
Share on other sites

I commented on this very subject in the suggestion box forum [ http://www.leadwerks.com/werkspace/topic/15019-one-to-rule-them-all/#entry101928 ]

 

Unity, for example, allows you to do this along with other toolsets/editors, e.g. wxWidgets like DialogBlocks. In regards to AggrorJorn OP this is not a one off experience. The lack of this functionality is not a deal breaker but is a nuisance.

  • Upvote 1
Link to comment
Share on other sites

I commented on this very subject in the suggestion box forum [ http://www.leadwerks.com/werkspace/topic/15019-one-to-rule-them-all/#entry101928 ]

 

Unity, for example, allows you to do this along with other toolsets/editors, e.g. wxWidgets like DialogBlocks. In regards to AggrorJorn OP this is not a one off experience. The lack of this functionality is not a deal breaker but is a nuisance.

A code IDE without a debugger is not very useful. This would just be opening an option to mess things up.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Yep I've had that issue too. The whole debugging can get strange if you step through complicated tables. Sometimes it seems to sit on the same line as you keep stepping then eventually it goes. Debugging coroutines doesn't work and I don't think breakpoint work correctly in our own "classes".

Link to comment
Share on other sites

Sometimes it seems to sit on the same line as you keep stepping then eventually it goes. Debugging coroutines doesn't work and I don't think breakpoint work correctly in our own "classes".

Yes, that is annoying. It takes some 'guessing' and 'assuming' on the programmers part but I can image most people not having any clue what exactly is going on. I don't know how this behaviour would be preventable by Josh though. I am sure it is not easy to connect the leadwerks debugger to the script editor. Never noticed that custom 'classes' do not debug or anything. It might be that I have overlooked it because of the other issues. Personnaly I find the editing part in the first post the most annoying.
Link to comment
Share on other sites

I've had problems with phantom breakpoints also. Another funny thing was I had breakpoints in a file that no longer existed so I kept getting errors until I recreated that file to remove the breakpoints. That was a while ago though. I think the biggest issue with the debugger imo is that it doesn't always correctly display numbers(and other things?), Rick made a post about it a month or two ago. This issue has sent me down a rabbit hole more than once. Because of these issues and how slow it is to start the debug build, I rarely use the debugger and use prints to debug issues.

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...