# 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:** 1

<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:** [May 16, 2022, 6:39pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/1 "2022-05-16T18:39:17Z")

</div>

Coming soon to the Ignition designer (and available now in 8.1.18 nightly builds):  
The first round of changes in an enhanced script editing experience (our [fourth most upvoted ideas request](https://ideas.inductiveautomation.com/ignition-features-and-ideas/p/script-editor-improvments))

So, what does that actually mean?  
Well, to start, we've replaced the backing 'code editor' Java component with a new one, which has some enhanced smarts to start with; plus, as a bonus, it's more aware of DPI scaling. This should be an automatic, seamless change across pretty much the entire designer - anywhere you're used to editing scripts should be a lot nicer to use now 🙂

This new editor has some basic niceties such as:

### Inline find & replace

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/1/610840ac4834a76a4ad9764d9e8349f92d89a70f.png)

### Code folding

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/9/793ec04b3c3a6c63b25f3803d48def172aaebae3.png)

### Visible whitespace

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/9/6902305c46def65c63e1e509bb19301e3393f0aa.png)

# Type Awareness

In addition, there's new awareness of variable and parameter types [1] in the script editor, so in various contexts, such as extension functions, parameter _types_ are hinted and autocompleted on their own.  
For instance, in a script transform, `quality` is known to be a `QualityCode` object, so methods and properties of the `QualityCode` type are exposed:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/6/964ae4c4a37f55f1c70a753dea75b827157df1a5.jpeg)

System functions [2] and Python's builtin functions are currently part of the enhanced type completion, with project and Python standard library scripts hopefully soon to follow:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/f/0f5dc6950fcae3261993a9cecb13b6f96f0f00ed.jpeg)

# Parameter Completion

As a nice quality-of-life change, the new editor also offers parameter completion assistance; if you auto-complete a method with multiple required parameters, you'll automatically enter a "parameter assistance" mode, where you can tab through the parameters and enter them one at a time:  
 ![Kapture 2022-05-16 at 11.20.23](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/2/42dcbaf7fa5c06eab2d64e55c4fdbf3086717777.gif)  
Note: If you don't want this, you can disable it across all script editors in the right click menu:

> **Disabling**
>
> ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/4/e4a1810dd0ef99056ebb8accf773cfc2a322a0a1.png)

# Tooltips

As a nice bonus, with richer contextual and type information comes easy support for contextual tooltips. Just hover over an extension function parameter, Python builtin, or system function, and get a useful hint:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/6/d6a2b55f28386b274b76a5500f2a1a27641ae43f.png)

[1] There's a _bit_ of a fib here - it's not true type awareness (yet) - there's no AST parsing going on. But it's pretty good as long as you don't actively try to break it.

[2] System functions aren't _truly_ type aware (e.g. return types) because of some API limitations. Module authors providing scripting functions, beware - 8.2 _will_ break the current script providers APIs, new signatures TBD.

With all that said - we're not done yet! Behind the scenes, there was a lot of extra work required to make this change seamless, and lay the groundwork for type-awareness. Future versions of Ignition should continue to add to this foundation.

Module authors - if you're providing any custom script hooks in your modules, look into the ExtensionFunctionPanel or PythonTextArea classes in the 8.1.18 SDK, and feel free to post questions and tag me.

---

<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:** [May 16, 2022, 7:11pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/2 "2022-05-16T19:11:08Z")

</div>

👍

Some improvements:

- for script in **Project Library** , autocompletion doesn’t list **system.perspective**.
- shortcuts or context menu to comment/uncomment few lines
- shortcuts or context menu to generate a comment block for function

and of course last but not least:

- autocompletion for custom libraries and functions

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 16, 2022, 7:14pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/3 "2022-05-16T19:14:17Z")

</div>

> [@mazeyrat](#):
>
> shortcuts or context menu to comment/uncomment few lines

**Ctrl-/** has always done this in the script editor (`#`) and the expression editor (`//`).

---

<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:** [May 16, 2022, 7:19pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/4 "2022-05-16T19:19:38Z")

</div>

> [@mazeyrat](#):
>
> for script in **Project Library** , autocompletion doesn’t list **system.perspective**.

Yeah, I think we've talked about this before. I think the 'right' answer is to have the project library feature a dropdown where you can select what scope to bring in hints from.

> [@mazeyrat](#):
>
> shortcuts or context menu to generate a comment block for function

"Smarter" templates for class and function definition would be good, yeah.

> [@mazeyrat](#):
>
> autocompletion for custom libraries and functions

Yeah, this is probably the next thing to add. Future enhancements shouldn't be nearly as much trouble to add as this first round was (🤞) so hopefully changes like that can happen within the next few releases.

---

<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:** [May 16, 2022, 7:28pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/5 "2022-05-16T19:28:44Z")

</div>

with a PC windows 10 and a french local, (azerty keyboard), this shortcut doesn’t work for me ☹.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 16, 2022, 8:17pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/6 "2022-05-16T20:17:13Z")

</div>

![French keyboard](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/0/d08e3bb8c4214d7bc3660f61f057cdc154bb9221.png)

_Image source: [AZERTY - Wikipedia](https://en.wikipedia.org/wiki/AZERTY)._

@mazeyrat, a quick web search reveals that the non-English keyboard layouts have been a problem in other softwares’ keyboard shortcuts too. The problem appears to be that you’re having to use the Shift key and this messes up the keycodes. (I can’t remember how exactly this works but the character is returned along with the status of the Ctrl, Shift and Alt keys.)

Some posts suggest that if you have a number keypad that Ctrl-/ or Ctrl-÷ or if you have a laptop with Fn numeric keyboard try Fn-Ctrl-/. (The older Dell laptops had this and it was super. I don’t know why they discontinued it.)

---

<div class="post-metadata">

**Author:** ![rcrownover](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rcrownover/32/17805_2.png) [@rcrownover](https://forum.inductiveautomation.com/u/rcrownover)\
**Post date:** [May 16, 2022, 8:50pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/7 "2022-05-16T20:50:11Z")

</div>

Much love to the IA team for a long-awaited set of features. It looks like a lot has gone into doing this well and getting it done the right way!

Didn't think we would get Type Awareness this soon, very stoked about that!

> [@paul-griffith](#):
>
> beware - 8.2 _will_ break the current...

I know this may upset some people, but when I hear about even-numbered version releases breaking things in the name of progress, I start getting excited for whatever is coming next.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 17, 2022, 1:52am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/8 "2022-05-17T01:52:47Z")

</div>

> [@rcrownover](#):
>
> I know this may upset some people

Just part and parcel of building modules. No worries.

---

<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:** [May 17, 2022, 12:15pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/9 "2022-05-17T12:15:31Z")

</div>

In the **function/class** list, it could be usefull to be able to sort in alphabetical order the list of function/class names

Example: unsorted  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/f/9f3d88d90555c597b311a5bbdc8911556c28f494.png)

The new editor has lost a very usefull shortcut: Ctrl + G:

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/4/446d2e47a5f43a86546c3913605a67b46a5617ef.png)

---

<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:** [May 18, 2022, 9:12pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/10 "2022-05-18T21:12:57Z")

</div>

> [@mazeyrat](#):
>
> sort in alphabetical order

Ah the good old sorting of lists that gets forgotten about 😁 I'm still stuck on an old version where the UDT list isn't sorted, haha

---

<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:** [May 20, 2022, 4:53pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/11 "2022-05-20T16:53:41Z")

</div>

It would also be great if constants/non-function scoped variables showed up in the outline list as well. If you want a constant stored in a project script, that is accessed from various perspective screens. It is an annoyance to have to copy a functions path, and then replace the function name with the constant name to quickly copy and get the full path of it. VS Code does this, but sadly I can’t grab them from there either since then its missing the script path!

---

<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:** [May 24, 2022, 4:16pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/12 "2022-05-24T16:16:03Z")

</div>

> [@mazeyrat](#):
>
> The new editor has lost a very usefull shortcut: Ctrl + G:

This will be back in the next nightly build (and 8.1.18 final).

---

<div class="post-metadata">

**Author:** ![Bradley\_Phillips](https://avatars.discourse-cdn.com/v4/letter/b/ad7895/32.png) [@Bradley\_Phillips](https://forum.inductiveautomation.com/u/Bradley_Phillips)\
**Post date:** [June 2, 2022, 1:46am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/13 "2022-06-02T01:46:24Z")

</div>

This is great, but if I could make a suggestion…

You could put together some stub or mock classes for the ignition and java imports and make these available on pypy or nexus.

Then you wouldn’t have to spend your time working and maintaining the ignition script editor, since developers could develop in whatever IDE with intellisense, such as VSCode or pycharm.

It would also allow us to write tests for our code that works outside of the ignition ecosystem. Such as automated testing and linting in GitHub.

These stubs would be great, but mocks even better because then we could write and test our code on our local workstations without needing to connect to a gateway (obviously it would eventually be deployed to the gateway)

That being said, stubs would be plenty as we could use those to write our own mocks

---

<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:** [June 2, 2022, 3:29am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/15 "2022-06-02T03:29:48Z")

</div>

> [@Bradley\_Phillips](#):
>
> some stub or mock classes

I guess I’ll show my lack of dev knowledge here, what is a stub?

---

<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:** [June 2, 2022, 6:38am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/16 "2022-06-02T06:38:55Z")

</div>

I’m going to go with empty declarations of functions from the `system` library so that at least you can reference the functions without seeing red everywhere 🤷‍♂️

---

<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:** [June 2, 2022, 7:59am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/17 "2022-06-02T07:59:26Z")

</div>

Good job IA! Can’t wait to have this new script editor.

---

<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:** [June 2, 2022, 8:25am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/18 "2022-06-02T08:25:54Z")

</div>

Oh, derp that makes sense.

Here is a community based library just for that:

> **[GitHub - thecesrom/Ignition: ⚡ A set of packages and modules that allows...](https://github.com/thecesrom/Ignition)**
>
> ⚡ A set of packages and modules that allows developers to get code completion for Ignition Scripting API scripting functions in their IDE of choice. - GitHub - thecesrom/Ignition: ⚡ A set of packag...

---

<div class="post-metadata">

**Author:** ![petr.sasin](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@petr.sasin](https://forum.inductiveautomation.com/u/petr.sasin)\
**Post date:** [June 2, 2022, 4:14pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/19 "2022-06-02T16:14:23Z")

</div>

Can’t wait new script editor. This should be real efficiency booster. I have waste so many time just for correcting typing mistakes …  
Actual script editor is not for 21st century.

---

<div class="post-metadata">

**Author:** ![thecesrom.git](https://avatars.discourse-cdn.com/v4/letter/t/dfb087/32.png) [@thecesrom.git](https://forum.inductiveautomation.com/u/thecesrom.git)\
**Post date:** [June 7, 2022, 12:17am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/20 "2022-06-07T00:17:25Z")

</div>

That repo has been moved to the `ignition-api` GitHub org.

For version 7.9:

> **[GitHub - ignition-api/7.9: 📦 Package for the Ignition Scripting API version 7.9](https://github.com/ignition-api/7.9)**
>
> 📦 Package for the Ignition Scripting API version 7.9 - GitHub - ignition-api/7.9: 📦 Package for the Ignition Scripting API version 7.9

8.0:

> **[GitHub - ignition-api/8.0: 📦 Package for the Ignition Scripting API version 8.0](https://github.com/ignition-api/8.0)**
>
> 📦 Package for the Ignition Scripting API version 8.0 - GitHub - ignition-api/8.0: 📦 Package for the Ignition Scripting API version 8.0

And for 8.1:

> **[GitHub - ignition-api/8.1: 📦 Package for the Ignition Scripting API version 8.1](https://github.com/ignition-api/8.1)**
>
> 📦 Package for the Ignition Scripting API version 8.1 - GitHub - ignition-api/8.1: 📦 Package for the Ignition Scripting API version 8.1

All of these can be installed via `pip`, so you can use it for developing and testing your code in PyCharm or Visual Studio Code, @Bradley_Phillips. Please note that the use of `venv`s is recommended.

---

<div class="post-metadata">

**Author:** ![hayden](https://avatars.discourse-cdn.com/v4/letter/h/91b2a8/32.png) [@hayden](https://forum.inductiveautomation.com/u/hayden)\
**Post date:** [June 7, 2022, 5:28am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/21 "2022-06-07T05:28:58Z")

</div>

Wondering if there will be an addition for an “indent selected” kind of button. Moving blocks of code between functions in buttons and the script editor can be very annoying if you have a long script and the indentation carries over

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