Automatically replacing quotes with backticks
On my previous Ubuntu computer, whenever I had a string like 'foobar', and replaced one of the quotes with a backtick, `, the other one would automatically follow and be replaced.
On my new Mac M1 Pro running Webstorm 2021, this does not happen. Whenever I replace one of the quotes, the other one stays behind (and even worse, sometimes my intention is misunderstood and when changing the other quote manually, it's replaced by _two_ backticks).
Did this feature go away, and if so why? Or how do I enable it on my Mac?
Please sign in to leave a comment.
It had never worked this way... Related feature request: https://youtrack.jetbrains.com/issue/IDEA-130326
There is Replace with template string intention available on
Alt+Enter
that converts a quoted string into template string; also if you have Smart Keys -> Surround Selection on typing quote or brace enabled, you can select the string, for example, using 'Expand Selection', and then type a backquote to get the quotes replaced with backquotes, e.g.:var z = /*selection start*/"foo ${bar}"/*selection end*/
-> type backquote ->var z = `foo ${bar}`
I'm very confused now. I've used this for _years_ on my previous computer. To my knowledge I had no custom add-in or something. When replacing one quote, the other one followed automatically. I am 100% sure. :)
But smart keys seems like something I could give a try, maybe it fulfills my need. Thanks.
I can confirm Henrik Hall's experience. On my windows machine, when replacing one quote, the other one followed automatically. This no longer happens on my Mac M1 version of Webstorm