Auto completion?

If i recall correctly, Glitch had an awesome function where if I typed ( then the editor would automatically complete it i.e. append )
but since yesterday (its the time when I noticed it)
I see the feature dissapeared.

So if I am incorrect about the exsitence of feature over glitch, correct me.
Else if it had some existence can anyone tell me why is it not working for me ??
Indeed I asked a friend of mine to test and he also noticed the same thing.

You’re right - it used to do that. We turned that off the other day, because we found it more annoying than helpful - If you’re trying to add ( before some code that already exists, it adds the ) in the wrong place, and it does the same thing with “”.

I’m interested in how everyone else feels about that feature.

For the moment, you can turn it back on by putting this in the JS console in the browser debugging tools:

application.editor().setOption(“autoCloseBrackets”, true)

1 Like

Aside from the problem you stated, its an really awesome feature I would love to see in any editor in use,
And I guess more people also feel like that.
And if you guys are planning to remove it, then I guess having it setup per-project can also be a good alternative. :smiley:

~~Just my feedback

How about only inserting the matching quote/bracket if the cursor is before whitespace (or the EOF) or if text is selected (in that case, the quotes/parens/etc should go around the selection.

it was really useful

In my opinion, you should have an option to enable/disable it… :slight_smile:

Why not settings up a button that turns it off/on ?

1 Like

You can always create a bookmark with the following content and put it in your bookmarks bar:

Enable Auto Close Brackets

javascript:application.editor().setOption("autoCloseBrackets", true);

I have one to disable autocompletition in HTML:

Disable Auto Close Tags

javascript:application.editor().setOption("autoCloseTags", false);
3 Likes

Thank you, this is much better than manually typing it!

Would be great to have this as a setting.

I generally find the autoclose feature somewhat exasperating :).

Hey @samdutton you might be interested in voting for Change Autoclose.

We don’t have immediate plans to make options for these kinds of settings but we’re actively working on the Editor so it’s possible this might come up down the road and it would be helpful for us to know what things folks would like to toggle.

Thanks @cori — done!

1 Like