How to surround selection without replacement?

I have "Surround selection on quote or brace" enabled in settings and if I highlight a section and enter a brace, it does in fact wrap that selection. Unfortunately is ALSO removes the existing braces. How can I disable that latter behavior?

Example:

If I highlight ('a', 'b') and enter `[` I'm left with ['a', 'b'].

What I would like to end up with is [('a', 'b')]

Basically I never want anything from a selection removed or otherwise changed when I'm surrounding it with a brace.

 

0

For this particular case, try highlighting ('a', 'b'), type [ then type (.  The [ will replace the parenthesis with bracket, and the ( will add the parenthesis back in.  Not sure if this will generalize to all the use cases.

0

请先登录再写评论。