How to disable text replacement quirk in the editor?

Answered

There is an odd behaviour in Rider's code editor that I find quite bothersome and haven't figured out how to turn it off.

Normally when you highlight some text and begin typing, you replace the text that was highlighted. However, in specific cases it will not replace the text. This seems to happen whenever the editor thinks that you're modifying a comparison operator (eg. ==, !=, >, >=, <, <=), although it can also be seen with arithmetic operators and the assignment operator. If you highlight part or all of the operator and then begin by typing any of the characters used in a comparison operator (=, !, >, <) then the highlighted text will not be replaced. It also occurs when highlighting brackets and trying to replace them with a different type of bracket. Interestingly, it even occurs when the highlighted text is inside of a string literal or a comment.

I don't understand the reason for this feature and it regularly throws me off. Does anyone know if there is a setting that can disable it? I would like for the highlighted text to always be replaced.

Thanks!

0
2 comments

As for the braces, you probably need to turn "Surround selection on typing brace" off in "File | Settings | Editor | General | Typing Assistance". Unfortunately, I didn't manage to reproduce the issue on operators, string literals or comments. What Rider version are you using? Did you install any plugins?

0
Avatar
Permanently deleted user

Thanks for looking into this, Julia.

After upgrading to 2018.2.3 I no longer see this behaviour. I was previously on one of the 2017 versions when this was happening, and I don't think I had any plugins installed.

0

Please sign in to leave a comment.