Auto completion?


#1

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.


What happend to glitch editor
#2

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)


#3

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


#4

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.


#5

it was really useful


#6

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


#7

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


#8

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);

#9

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