Home » Python » How to surround selected text in PyCharm like with Sublime Text

How to surround selected text in PyCharm like with Sublime Text

Posted by: admin November 29, 2017 Leave a comment

Questions:

Is there a way to configure PyCharm to be able to surround selected code with parenthesis by just typing on the parenthesis key, like when we use SublimText 2?

Answers:

I think you want something like

Settings | Editor | General | Smart Keys -> Surround selection on typing quote or brace

Questions:
Answers:

PyCharm 4.0 has the option to Surround With..., by selecting your code snippet and pressing

ctrl + alt + T

Option 1 should provide you with the functionality you are looking for:

PyCharm Ctrl+Alt+T