How to surround selection with parenthesis?

Hey folks!

I have Surround selection on typing a brace or parenthesis enabled, but it only seems to work for braces and not parenthesis.

Say I have this line:

var foo = "foo";

If I select "foo" then press {, I end up with:

var foo = {"foo"};

...which is great! But if I select "foo" then press ( instead, I end up with:

var foo = (;

...which isn't what the documentation claims:

If this checkbox is selected, you can select a code block or an expression, then type an opening { or a closing } brace to put the selection inside braces, or type an opening ( or a closing ) parenthesis to put the selection inside parentheses.

What am I doing wrong?

Thanks!

3 comments
Comment actions Permalink
Official comment

Hi, Cariad

To make it behave as you want, please check the checkbox "Auto-insert pair brackets, parentheses and quotes" in Settings:
Editor | General | Typing Assistance-> Auto-insert pair brackets, parentheses and quotes

Let me know if you have any questions.

Comment actions Permalink

Thanks Dmitry Kazantsev! I'm clearly too stupid to use Rider. I lost half of my evaluation period trying to figure out how to configure the editor and waiting for support. My evaluation licence has since expired, and I've found myself far more productive in VS Code.

0
Comment actions Permalink

Thanks for sharing your experience, Cariad . Please feel free to contact us via Sales Support and we'll see what we can do about possibly extending the evaluation period.

Moreover, the new version of Rider 2021.2 is coming (around the end of July), so you will be able to retake your evaluation period.

0

Please sign in to leave a comment.