Skip to content

What about autofill characters } and ) ? #1195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
EthanHermsey opened this issue Oct 14, 2019 · 6 comments
Closed

What about autofill characters } and ) ? #1195

EthanHermsey opened this issue Oct 14, 2019 · 6 comments

Comments

@EthanHermsey
Copy link

Hey!

I have a request.
Can there be a function that adds a } character after you type in { and puts the cursor in between?The same for ( and [ characters would be nice. With a checkbox in the options tab.
I would put in a pull request but i can't make any sense of this code repository ;p
Thanks you,

Ethan

@catarak
Copy link
Member

catarak commented Oct 17, 2019

thanks for the suggestion! this project has had a lot of discussion about whether or not to add this feature, see #55 and #941. i'm open to hearing more pros and cons! a guiding principle of this project is keeping the editor simple and not adding a ton of features, so i'd like to add it only if it seems like it would add a lot to the experience.

@EthanHermsey
Copy link
Author

EthanHermsey commented Nov 26, 2019

Hey, sorry for the delay in my answer.

I was thinking that more experienced programmers would be more attracted to keep using the editor.

I use it often to just prototype an idea or test something. It does really work well, with the filesystem, autosave, direct preview of your code, and the code beautifier (which a pretty big feature where i could compare the autocomplete to). But noone really likes typing long code :p I tend to go back to vscode on my machine just for the auto-completion.

People who haven't been coding for long could get confused about characters popping up. On the other hand the feature wouldn't even have to be activated initially, people could add it through the settings menu.
It's also hard to draw the line, what characters should you complete.. {}, (), [], '', "", maybe ``? Do you also do function/variable names? I would be happy with just the first 5.

This is my contribution to this discussion, thank you :) Ethan

@catarak
Copy link
Member

catarak commented Dec 5, 2019

I hear you! Part of me feels like it's the kind of thing that newer programmers should "practice" keeping track of opening and closing braces/brackets, but since basically every text editor out there autocompletes them by default, maybe it doesn't make any sense. I'm also compelled by how many times this issue has been submitted.

@catarak
Copy link
Member

catarak commented Dec 12, 2019

I'm going to close this as a duplicate of #941, but this discussion is still very much alive!

@EthanHermsey
Copy link
Author

You've added it! That's amazing! I'm so happy with it, thanks! :D

@catarak
Copy link
Member

catarak commented Dec 11, 2020

Yay! Glad it's useful to you ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants