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

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [July 3, 2023, 10:04pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/82 "2023-07-03T22:04:09Z")

</div>

PSA to anyone stumbling on to this thread.

I've confirmed a bug with support introduced somewhere in 8.1 that will break find and replace if you use the word "Arguments" in your doc string (triple speech marks).  
Apparently this clashes with the inbuild Ignition function documentation and confuses the parser.

So avoid using that like i did, and stick to the shorter version of "Args"... 😄 🙃

Now to find all the places i've done it amongst hundreds of windows..

---

<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:** [July 3, 2023, 10:13pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/83 "2023-07-03T22:13:12Z")

</div>

> [@richardNZ15](#):
>
> Apparently this clashes with the inbuild Ignition function documentation and confuses the parser.

The good news is that it only affects Vision extension functions in particular. A bad choice when we first introduced their serialization that was basically unavoidable when extracting them back out again to upgrade, unfortunately.

---

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [July 7, 2023, 5:45am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/84 "2023-07-07T05:45:38Z")

</div>

Will it still be a problem if there is another `def` block inside the main extension function?  
Like this for example?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/c/ecd01bce2e9de0031c607f153e6b8dadeb86629a.png)

---

<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:** [July 7, 2023, 6:25am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/85 "2023-07-07T06:25:04Z")

</div>

No. Only a triple-double-quoted bare string, on the very first line, containing the literal string `Arguments:` will cause the issue. Break any of those conditions and you're fine.

---

<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:** [August 18, 2023, 8:01am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/86 "2023-08-18T08:01:31Z")

</div>

Docstrings per Google style  
It will be amazing if you clould add a context menu on right click on function to generate this docstrings template !

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/c/ec79a33d7312cad59afb6daa37a1e686c79cb54c.png)

---

<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:** [January 29, 2024, 10:16pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/87 "2024-01-29T22:16:04Z")

</div>

Note: Any really big stuff will have to wait until _after_ 8.3.0, so don't expect a lot on this topic for a while. _But_, a dependency bump in the bundled library did get a few little niceties I think you'll all appreciate; these will be in the nightly tomorrow and in 8.1.38 full:

1. "Smart" quotes - single and double quotes will automatically surround the selection, and nicely 'overtype' at the end.  
 ![Kapture 2024-01-24 at 10.27.53](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/b/6b93c5ce7e88a65228cfeef84b31dc61d692a613.gif)
2. "Smart" square brackets and curly braces - much the same as quotes, for automatic surround of a given selection.  
 ![Kapture 2024-01-24 at 10.29.06](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/0/50954cd6786f7f01d6f5bed11dcfb43f04e889e4.gif)
3. Proper automatic indentation. This one is something I had so baked into my brain I didn't even realize it was missing - I literally always do a colon -\> newline -\> tab automatically, so now I end up with _two_ tabs when editing a script in the designer 😆  
 ![Kapture 2024-01-24 at 10.33.55](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/0/90f3244e801d0c9a31efbab6b9fc63748d07a0e1.gif)
4. No flashy GIF, but I tweaked the paste handling a little bit to _hopefully_ help address complaints like [Copy-Pasting Script in Ignition 8.1.32 Results in Indent/Dedent Errors](https://forum.inductiveautomation.com/t/copy-pasting-script-in-ignition-8-1-32-results-in-indent-dedent-errors/80630) 🤞

---

<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:** [January 29, 2024, 10:33pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/88 "2024-01-29T22:33:09Z")

</div>

> [@paul-griffith](#):
>
> Proper automatic indentation

Yay!

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [January 30, 2024, 12:32am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/89 "2024-01-30T00:32:27Z")

</div>

> [@paul-griffith](#):
>
> Proper automatic indentation

This is awesome!

--runs to recommend upgrade solely for this function--

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [February 1, 2024, 5:20pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/90 "2024-02-01T17:20:04Z")

</div>

I actually did just that after reading the patch note !

---

<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:** [February 2, 2024, 12:02am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/91 "2024-02-02T00:02:04Z")

</div>

> [@paul-griffith](#):
>
> Proper automatic indentation. This one is something I had so baked into my brain I didn't even realize it was missing - I literally always do a colon -\> newline -\> tab automatically, so now I end up with _two_ tabs when editing a script in the designer 😆

I do this _all the time_ in PyCharm because of this haha

Looking forward to upgrading! In a few years' time, knowing our end users 🙄

---

<div class="post-metadata">

**Author:** ![A\_Power](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@A\_Power](https://forum.inductiveautomation.com/u/A_Power)\
**Post date:** [February 2, 2024, 4:23am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/92 "2024-02-02T04:23:26Z")

</div>

yes please! that looks mint

---

<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:** [May 16, 2024, 7:39am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/93 "2024-05-16T07:39:52Z")

</div>

Are there any plans to autocomplete imported java libraries that are not 'system.' or self written scripts?

---

<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, 2024, 2:11pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/94 "2024-05-16T14:11:52Z")

</div>

Eventually, maybe.

Two big complications:  
The first, understanding import statements requires a constant AST parse of your local code (which will often be syntactically wrong for some amount of time), so you have to do smart caching and best effort stuff. Not at all impossible; every IDE does it, but it's a big effort.  
The second: Java reflection gives you a lot at runtime, but it's really not as useful as you might hope. You can get arguments, return types, exceptions, etc - but no argument names, no method or class documentation, etc. You'd also have to constantly round trip with the gateway to ask it for reflection information on any gateway scoped imports, since they won't be available to the designer.

---

<div class="post-metadata">

**Author:** ![Dustin\_VanKeuren](https://avatars.discourse-cdn.com/v4/letter/d/b782af/32.png) [@Dustin\_VanKeuren](https://forum.inductiveautomation.com/u/Dustin_VanKeuren)\
**Post date:** [August 1, 2024, 1:21pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/95 "2024-08-01T13:21:10Z")

</div>

Or they could, you know, add a button for it so people do not have to use mind reading or random key sequence testing.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [August 3, 2024, 10:01am UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/96 "2024-08-03T10:01:05Z")

</div>

> [@Dustin\_VanKeuren](#):
>
> random key sequence testing.

`Ctrl + /` is not exactly random. It's a common, almost ubiquitous, shortcut used for commenting out large sections of code. Try it in other places such as just about any SQL management tool or IDE, and I'll bet that it works in most of those places too.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [August 20, 2024, 3:08pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/97 "2024-08-20T15:08:42Z")

</div>

One thing my old eyes would appreciate is instead of the teeny tiny red bar on the right, do a light red highlight of lines with errors?  
Like highlight the entire line vs just the little red thingy on the right 🙂

---

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [August 20, 2024, 8:56pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/98 "2024-08-20T20:56:26Z")

</div>

I'm not sure if its just me, but I feel that often the red bar on the right doesn't actually indicate the correct line of code that has the problem?  
I've noticed it moves around as you scroll sometimes which makes troubleshooting difficult.  
Agree that highlighting the actual line with syntax error in question would be great.

---

<div class="post-metadata">

**Author:** ![Dustin\_VanKeuren](https://avatars.discourse-cdn.com/v4/letter/d/b782af/32.png) [@Dustin\_VanKeuren](https://forum.inductiveautomation.com/u/Dustin_VanKeuren)\
**Post date:** [October 21, 2024, 2:51pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/99 "2024-10-21T14:51:10Z")

</div>

Well, not everyone may be aware of this.

---

<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 12, 2024, 12:49pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/100 "2024-11-12T12:49:05Z")

</div>

Is IA making more moves here? It was nice seeing some improvements, but it keeps allot of us more hungry for new features and I feel this topic is left on read a bit. Will 8.3 come with new upgrades here?

What would be nice to see:

- After you do a script import like this: `from Infrastructure.Utils import decorators`, I'd like to have decorators to still have an autocomplete, so it makes more sense to do these kinds of imports.
- When using a class instance, it would be soo nice to see an auto-complete of the classes properties and functions.
- The search in script functionality needs a find-and replace in the current script. Also we need options with capitalisation in that functionality.
- When selecting a variable, it would be nice to see where that variable is used in the script.

---

<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 12, 2024, 12:51pm UTC](https://forum.inductiveautomation.com/t/coming-in-8-1-18-script-editor-improvements/59629/101 "2024-11-12T12:51:55Z")

</div>

I assume `Infrastrcture.Utils` is your own custom script? If so - don't import into your other scripts. Refer to it by the full name. You can get the occasional weird caching issue if you import like that. Added bonus is that now your decorators `@Infrastructure.Utils.someDecoratror` will autocomplete.

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

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