Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Open source autocomplete for Atom

Enthusiast ,
Aug 29, 2018 Aug 29, 2018

CarlosCanto  wrote

My biggest wish was that the ESTK autocomplete worked, it is an invaluable tool for both beginners and experienced users. It works ok on windows, on mac it doesn't. I'm yet to try what others use, Brackets, Sublime, Atom, etc.

Repo with more details here.

I found an extension for creating autocompletes in Atom, then an easy-to-start and understand walkthrough for creating your own from that template, so I have one working:

LikableOrdinaryAmurratsnake-size_restricted.gif

It takes 3 terminal commands to set up, then is installed and found in your Packages tab:

U1a5H2i.png

And it's not hard to work on at all, you can modify the JSON file inside of Atom then save and reload Atom to see the effects. It's contextual to a .jsx file:

GaseousUnawareCrossbill-size_restricted.gif

The format of the JSON is pretty straightforward, but it'd be nice not to have to do this all by hand. Is there any list-form OMV or way to access the data as JSON? That'd be super helpful but that's not going to stop me from working on this manually, I think Atom is an incredibly good resource for scripting and I'd love to have this.

TOPICS
Scripting
959
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Valorous Hero ,
Aug 29, 2018 Aug 29, 2018

Hey that is awesome stuff!

To help in your quest you can probably use some easy web code to turn the OMV xml documentation format into your preferred JSON format.

The AI omv.xml is located on my mac at this location:

/Library/Application Support/Adobe/Scripting Dictionaries CC/Illustrator 2018/omv.xml

It's got stuff in it that looks like this:

    <classdef name="TextAntialias" enumeration="true">

      <shortdesc>The type of text antialiasing.</shortdesc>

      <elements type="class">

        <property name="NONE" rwaccess="readonly">

          <shortdesc>Text from a point.</shortdesc>

          <datatype>

            <type>int</type>

            <value>1</value>

          </datatype>

        </property>

        <property name="SHARP" rwaccess="readonly">

          <shortdesc>Text within an area.</shortdesc>

          <datatype>

            <type>int</type>

            <value>2</value>

          </datatype>

        </property>

        <property name="CRISP" rwaccess="readonly">

          <shortdesc>Text on a path.</shortdesc>

          <datatype>

            <type>int</type>

            <value>3</value>

          </datatype>

        </property>

        <property name="STRONG" rwaccess="readonly">

          <shortdesc>Text on a path.</shortdesc>

          <datatype>

            <type>int</type>

            <value>4</value>

          </datatype>

        </property>

      </elements>

    </classdef>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 29, 2018 Aug 29, 2018

Hey that is really awesome stuff!!!

here are two really awesome xml to json converters

How to convert XMl to JSON object in jsx ?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 29, 2018 Aug 29, 2018
LATEST

We have two now!​

ThoughtfulImpressiveGrasshopper-size_restricted.gif

I was told to try TypeScript with Adobe types so this one is incredibly robust and already complete (as a base template per project), but requires some setup each time and the autocomplete field isn't freely customizeable. These two replies are amazing though, and it really opens up the possibilities for the first version above, which works in any .jsx file with no setup beyond the initial install.

The Windows path equivalent for the OMV file is C:/Program Files/Common Files/Adobe/Scripting Dictionaries CC/illustrator 2018/omv.xml, it's around 18k lines but the template format might not be very hard with regex for any fine-tuning/pre-processing before xml conversion. I'll be trying it! I still really like the custom More... hyperlink and edit fields, because we'd have the freedom to customize it just like the TypeScript parallel or even beyond it aesthetically, even to running custom code snippets.

Another obstacle to using TypeScript is that it's a .ts file which needs to be compiled before being run and I'm not sure how to launch that from Atom yet. When editing an uncompiled .jsx file, I'm currently using the Process Palette package to run this shell command via hotkey:

"C:\Program Files\Adobe\Adobe Illustrator CC 2018\Support Files\Contents\Windows\illustrator.exe" -r {fileAbsPath}

This is a pretty big barrier because running scripts and tests is so essential to debugging and writing, though the TypeScript autocomplete is an amazing reference. In the version without TypeScript, I can instantly run any script in AI.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines