# Coming in 8.1.18: Script editor improvements

**URL:** <https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629>\
**Category:** Ignition\
**Created:** [May 16, 2022, 6:39pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629 "2022-05-16T18:39:17Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![scottmwyant](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/scottmwyant/32/66369_2.png) [@scottmwyant](https://forum.inductiveautomation.com/u/scottmwyant)\
**Post date:** [September 2, 2022, 2:28am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/62 "2022-09-02T02:28:26Z")

</div>

Re: @Bradley_Phillips on June 1st, comment 12.

Came here to say this!

Big fan of VS Code here. With all the work being done in VSCode + extensions, I feel I’ll always be disappointed by the designer editor.

That’s not meant to be a knock on IA team, I just think they have bigger fish to fry and the number of total hours spent developing VS Code (including community extensions) is probably staggering.

I wanted to point out that VS Code does have a remote development mode. Perhaps that technology could be used to edit scripts on the gateway? I really don’t know what the architecture for that would even look like. Just throwing it out there. Probably a IA backed extension for VSCode??

I’d pitch this as a way to give Ignition users a rich script editing experience that would probably even take some work off the IA team.

> **[Visual Studio Code Remote Development](https://code.visualstudio.com/docs/remote/remote-overview)**
>
> Visual Studio Code Remote Development

@paul-griffith, anyone ever think of this kind of approach?

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [September 2, 2022, 4:10am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/63 "2022-09-02T04:10:47Z")

</div>

> [@Any news about script editor improvments?](https://forum.inductiveautomation.com/t/any-news-about-script-editor-improvments/53970/6):
>
> I would _love_ to make the designer an [LSP](https://microsoft.github.io/language-server-protocol/) _client_, which would allow offloading a lot of tasks to external editors; but to do that we’d have to push designer-local resources to disk somewhere, and there’s some tricky complications there.
> 
> Similar complications exist for pushing files to disk and opening in external editors; in addition, opening an external editor such as VS Code wouldn’t work perfectly without some doing because: 1. you wouldn’t have your project scripts in the right spots, and 2. you wouldn’t have autocompletion for any system functions, and 3. you wouldn’t have autocompletion for any Java libraries.  
> Doing that properly might require the designer acting as an LSP **server** , which is also a big task.

Here is a technical answer to _how_ it would be done, though it doesn’t really call out if it’s on the docket. I would have to assume it’s sadly pretty far out. We are talking about practices that are likely the future of the product, but the team at IA are probably focused on the problems of today before that of tomorrow. Don’t get me wrong, this type of feature would revolutionize the platform, and I would be the first to adopt it. However It’s probably a ways out, unless there are some  
Module dev gurus willing to take on the challenge of making this a module feature, if a module can even handle it.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [September 2, 2022, 3:35pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/64 "2022-09-02T15:35:48Z")

</div>

> [@paul-griffith](#):
>
> > [@Bradley\_Phillips](#):
> >
> > IMO, so much work would be required to reach the featureset and quality of something like VSCode, and VSCode already exists and is free to use.
> > 
> > The work that César Román has done in his repository could be coupled with VSCode as the ‘standard’ for scripting in IA.
> 
> Reaching parity with VSCode is definitely not a goal (nor is it feasible, for obvious reasons). However, bundling VSCode is also not feasible. I _would_ like to see a system in the future where external code editors are supported, but making the core product better is an obviously good step in the short term.

@scottmwyant; see my post higher in this thread. There's a _lot_ of technical hurdles to giving external editors access to scripting. You can sort of do it _right now_, with the project library, but the way other areas of Ignition 'bundle' scripts into arbitrary resources is the main problem with attempting to edit other areas. Getting an external editor to 'understand' all the context of an Ignition scripting environment (and giving it access to bidirectionally update text in a script) is a big hurdle. That's why I mention making the designer an LSP _client_; then it's a lot easier to 'offload' autocomplete work to external programs that have all that time invested.

Definitely something we're thinking about into the future, though.

---

<div class="post-metadata">

**Author:** ![Dan\_Bridgeman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dan_bridgeman/32/3610_2.png) [@Dan\_Bridgeman](https://forum.inductiveautomation.com/u/Dan_Bridgeman)\
**Post date:** [September 15, 2022, 3:24pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/65 "2022-09-15T15:24:13Z")

</div>

> [@Alex\_Taylor](#):
>
> There's a lot to like about the inline search feature in 2.1.18, but I've run into a couple of issues with it.
> 
> First, F3 no longer seems to work as a "repeat search" command. The ability to do this with a single keypress rather than hunt for and click the little down-chevron is much missed.
> 
> Second, it would be nice if performing the search would put input focus back into the editor, rather than leaving it in the search field. I also haven't found a way to move focus back without using the mouse.

Agreed on all of the above. I do like the ability to modify the search string and to use regular expressions, but having to keep going back and forth between mouse and keyboard slows things down significantly.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [September 21, 2022, 3:31am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/66 "2022-09-21T03:31:20Z")

</div>

I just wanted to say that the addition of “intellisense” of user script library functions is _incredibly_ useful! It’s a very nice creature comfort to have! 🙂 thanks for adding it!

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [September 23, 2022, 8:29pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/67 "2022-09-23T20:29:58Z")

</div>

Yes Big up to @paul-griffith and the IA team for this great feature !

There is still a few room for small improvments…shortcuts, function comment generator, function list sort option, etc

---

<div class="post-metadata">

**Author:** ![louagejasper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/louagejasper/32/86311_2.png) [@louagejasper](https://forum.inductiveautomation.com/u/louagejasper)\
**Post date:** [November 8, 2022, 11:16am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/68 "2022-11-08T11:16:23Z")

</div>

A ctrl-shift-arrowdown shortcut for copying lines would also be nice. It's so useful in vscode, makes copying lines so fast!

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 8, 2022, 4:29pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/69 "2022-11-08T16:29:12Z")

</div>

Ctrl + D will duplicate the current line; that might be the same as what you're looking for?

Rebinding of keyboard shortcuts is a thing we'd really like to add 🙂

---

<div class="post-metadata">

**Author:** ![louagejasper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/louagejasper/32/86311_2.png) [@louagejasper](https://forum.inductiveautomation.com/u/louagejasper)\
**Post date:** [November 8, 2022, 4:41pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/70 "2022-11-08T16:41:23Z")

</div>

For me, ctrl-d removes the current line 🤔. Is there a documentation of all the current bindings?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 8, 2022, 4:49pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/71 "2022-11-08T16:49:24Z")

</div>

What version of Ignition are you using? Ctrl + D would delete in the older editor, but is duplicate in the new one.

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [November 8, 2022, 5:40pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/72 "2022-11-08T17:40:28Z")

</div>

You can put this as the very last item on the wish list but since we are talking about key bindings, a way to enable vim key bindings would be cool

---

<div class="post-metadata">

**Author:** ![louagejasper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/louagejasper/32/86311_2.png) [@louagejasper](https://forum.inductiveautomation.com/u/louagejasper)\
**Post date:** [November 9, 2022, 7:40am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/73 "2022-11-09T07:40:33Z")

</div>

I was testing this on 8.1.18, but I see on 8.1.21 it does work, great!

---

<div class="post-metadata">

**Author:** ![Christian\_de\_Bellefe](https://avatars.discourse-cdn.com/v4/letter/c/e9c0ed/32.png) [@Christian\_de\_Bellefe](https://forum.inductiveautomation.com/u/Christian_de_Bellefe)\
**Post date:** [December 20, 2022, 4:14pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/74 "2022-12-20T16:14:15Z")

</div>

It's not working for me too.

Windows 11, French Canada QWERTY Keyboard.

When i press CTRL-/, it just collapse Every indentation. This is one of the most annoying problem i've found in Ignition. The 1st major irritant i've about Ignition is that when i press ESC when a popup is shown in the designer, i expect it to Cancel this popup. Windows and many other OS are built like this since ages...

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [March 9, 2023, 7:56pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/75 "2023-03-09T19:56:52Z")

</div>

Any chance we could put a property selector on the script editor? I like to do all my scripting in script editor like my buttons action buttons are usually something like `myLibrary.submit(event)` but this means normally I have to do my property selectors in the button script window, then copy them over to my project library script. It'd be nice if there was the ability in the script editor to pick a window I want to pick a property from and then pick a property off that component and get the `event.source.path.to.my.prop`. Would this be possible?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 9, 2023, 8:51pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/76 "2023-03-09T20:51:07Z")

</div>

Hmm. That would get complicated fast (e.g. Vision, Perspective, alarm pipelines, SFCs, reporting all have their own "selectors" they would potentially want to contribute).

I feel like a better paradigm might be more flexible editing of project library scripts from anywhere in the designer. Though that still sort of has the same problem, unless the project lib editor you open is contextualized somehow by the local editor...

I'll have to think about it. I can definitely see the pain point.

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [March 10, 2023, 2:35am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/77 "2023-03-10T02:35:27Z")

</div>

We typically put entire transform scripts inside project scripts, just due to them being stored as Python files.

Would be great if through some behind the scenes magic those transforms got stored and edited similarly to project scripts, would solve the whole context of params being passed through.

Obviously a harder ask though

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [March 10, 2023, 1:49pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/78 "2023-03-10T13:49:43Z")

</div>

Yea not sure what the best way to handle it would be, but it is certainly a bit of an annoyance. I think a floating script editor that you can open wherever could be the right solution here.

---

<div class="post-metadata">

**Author:** ![matthew.ayre](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matthew.ayre/32/19499_2.png) [@matthew.ayre](https://forum.inductiveautomation.com/u/matthew.ayre)\
**Post date:** [April 24, 2023, 11:11am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/79 "2023-04-24T11:11:50Z")

</div>

> [@paul-griffith](#):
>
> There’s some trickery involving class bodies and ` __init__ ` methods, but other than that it’s fairly straightforward.

Sorry to drag up an old topic, but I'm struggling to get class body docstrings to work. I can see in the [IA manual](https://docs.inductiveautomation.com/display/DOC81/Scripting+in+Ignition) that class documentation (_"Autocomplete hints will also display docstrings for user-written functions."_) is not explicitly mentioned and wondered if it's supported?

As you mentioned some 'trickery' involved, could you elaborate further? I'm sure I'm missing something obvious 😅

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 24, 2023, 4:23pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/80 "2023-04-24T16:23:18Z")

</div>

Ah, I bet I know the problem.

Is your class a 'new style' class, that properly inherits from `object`? As in:  
`class MyClass(object):`? The current detection for the docstring relies on the first AST node after the class entry being a string literal, but evidently I forgot about inheritance in my unit tests 🙈.

The "trickery" I alluded to was just that there's a preference to give you the hint for the ` __init__ ` method over the class description, since you're (usually) constructing a class vs referring to what it is. Improving the contextual nature of these hints is _also_ on the list of planned improvements.

So, you can see a class with no superclass and no init method does hint the class docstring:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/c/9ce8d6b430df30aa40a6c8df754b2bcf10e8fd18.png)  
But if your class has any superclass(es), the class method isn't available, and so it tries to hint the init method:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/a/daba0a3990a1f181c1f43421bd019cc67b764f00.png)  
And if you have a specifically defined init method docstring, that will always be preferred:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/7/5766262bdbf8eacc8b006307145dc396b602825b.png)

I'll make a note to improve the class body docstring parsing; I'm already planning to revisit the parsing here in the next few weeks to add parsing for Google-format docstrings.

---

<div class="post-metadata">

**Author:** ![matthew.ayre](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matthew.ayre/32/19499_2.png) [@matthew.ayre](https://forum.inductiveautomation.com/u/matthew.ayre)\
**Post date:** [April 24, 2023, 7:15pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/81 "2023-04-24T19:15:56Z")

</div>

Thanks for the explanation @paul-griffith 🙂 you hit the nail on the head. As others have echoed, the script editor improvements have been an excellent addition, looking forward to seeing the next pass 😃

[Previous page](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629.md?page=3)

[Next page](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629.md?page=5)
