Is there a plan to enable the arcade ide to auto-indent like other languages( python )?

610
11
02-27-2025 07:25 AM
RPGIS
by MVP Regular Contributor
MVP Regular Contributor

Just a basic question but is there any plans to update arcade so that ide indents like it does for other languages? I don't know if this question has been asked but I have been using other ides( Code Writer ) to write the code needed simply due to syntax and indentation.

Specifically regarding ArcGIS Pro.

11 Replies
AustinAverill
Frequent Contributor

What is this "indent" you speak of??

HaydenWelch
MVP Regular Contributor

It doesn't count as gratuitous nesting of you never indent!

AustinAverill
Frequent Contributor

I attended an Arcade workshop from ESRI and it was suggested that you should avoid code being in more than one continuous line.....

HaydenWelch
MVP Regular Contributor

I'm going to be charitable and interpret that as "keep your Arcade scripts short" and not "who needs whitespace"

0 Kudos
RPGIS
by MVP Regular Contributor
MVP Regular Contributor

I mean it adds a few spaces so you can identify when a new line or working with dictionaries or arrays.

'un-indented code'
{
  'Indented line of code'
  }
KenBuja
MVP Esteemed Contributor

You can apply standard linting rules (which includes indenting) to your code with Shift+Alt+F or right-clicking and selecting Format Document.

Snag_ed760af.png

Snag_ed779e4.png

  

ZachBodenner
MVP Regular Contributor

Is that something you'd need to do each time you open the Arcade element?

Happy mapping,
- Zach
0 Kudos
RPGIS
by MVP Regular Contributor
MVP Regular Contributor

Your suggestion unfortunately does not work in pro. In either arcgis online and enterprise portals it does indent but the pro version does not.

0 Kudos
KenBuja
MVP Esteemed Contributor

Esri does plan to upgrade the Arcade editor in ArcGIS Pro, but it doesn't sound like it's going to be in the next release.

See this idea

0 Kudos