Webstorm: How to add surround quote, parentheses,... when I highlight a some text
Hi Webstorm team,
For some development tools: vscode, sublime, atom. When I highlight some words, then I press quote, the highlighted text will be surrounded automatically by quote. It works the same when I press (, [, " or `.
I can't know how to do it like that with Webstorm.
Could you help me how to config to has this feature?
It's small, but very convenience feature.
Thanks in advance.
Thanh.
请先登录再写评论。
please try enabling 'Surround selection when typing quote or brace' in Preferences | Editor | General | Smart keys.
Thanks @elena for your quick response, your suggestion help me a lot.
haven't got what you mean. Is the second example a result of surrounding $toSurround with quotes? where do dots come from? Please clarify your steps
Yes the second example is a result of surrounding $toSurround with quotes. And the dots come from manually writing.
Surrounding with dots is what i needed. I have often this situation.
there is no "surround with dots" feature, sorry
Can you add it as feature request?
Please feel free to file a request to youtrack, https://youtrack.jetbrains.com/issues/IDEA. But, IMO, it has a low chance to be implemented - surrounding with dots is not a typical code editing scenario
You could use some custom Live Template of surround kind here.
https://www.jetbrains.com/help/phpstorm/tutorial-creating-live-templates.html
Feature Request: https://youtrack.jetbrains.com/issue/WI-45075