iafan/goplayspace

Add setting to toggle auto-pairing of quote and braces

therealplato opened this issue · 5 comments

The auto-pairing is painful. When I type func f(){} I end up with func f(){}}). When I type m["b"] I end up with m["b"]"]. I'm spending equal time typing code and backspacing over typos I didn't type.
I recognize that some coders are accustomed to this behavior but I don't think it should default to enabled.

iafan commented

I agree that the quote/brace completion needs some tweaks to become useful. What currently is missing is an ability to type the closing quote/brace without duplication (the same way it is done in e.g. Sublime or VSC). When this is done, I think the completion won't get in the way (in your case you will get exactly func f(){}), so there will be no need to disable it entirely.

That would help! We could also delete the match if adjacent. i.e. if I press the keys f("<backspace> the result would be f() with my cursor in between the braces

iafan commented

Yep, that's what other editors do as well. I'll look into improving this behavior.

iafan commented

Both features/fixes are implemented and live on https://goplay.space/ (please reload the page to make sure you're using the latest code). Let me know if this fixes your problem.

tyvm, looks good on Windows!