Is there a way to configure PyCharm to surround the selected code with a bracket just by typing the bracket key, for example, when we use SublimText 2?
I think you want something like
Settings | Editor | General | Smart Keys Settings | Editor | General | Smart Keys → Surround selection on typing quote or brace
Settings | Editor | General | Smart Keys
Surround selection on typing quote or brace
PyCharm 4.0 has the ability to Surround With... by selecting a code snippet and clicking
Surround With...
ctrl + alt + T
Option 1 should provide you with the functionality you are looking for: