有没有一种简单的方法可以从选择中删除括号等?

Is there a simple way to remove brackets etc from a selection?

在 PyCharm 中,我喜欢智能键意味着我可以 select 一个元素,然后键入“[”以将 selection 括在方括号中(以及圆括号、引号, 大括号).

有没有办法做相反的事情 - 即突出显示一个元素然后删除周围的括号等?

我已经搜索了 Google 和 Stack Overflow,以及智能键的 PyCharm 设置等解决方案,我看到了一些关于它的非常古老的问题,但找不到答案不能归结为正则表达式或宏...

我想从 PyCharm 中的 selection 中删除周围的括号等,我查看了产品自己的设置并在线搜索。

你运气不好,默认情况下 PyCharm 没有从代码块或线段周围删除括号的功能。您可以通过转到 Settings/Preferences > Editor > General > 查看 Smart Keys functionalities in the documentation 或 IDE Smart Keys 但没有您想要的功能。

but can't find an answer that doesn't boil down to regex or macros...

而且您不会找到一个,因为 IDE 不提供该功能。您必须使用 live template variables or as an external tool.

来实现它

我搜索了 JetBrains marketplace for the expectable keywords but aside of a couple of plugins that come close 没有一个可以满足您的需求。