How can I apply a Postfix Completion to an expression separated by spaces in PyCharm

32 Views Asked by At

I'm new in PyCharm IDE and I'm now personalizing my code snippets (Live Templates | Postix Completion) but don't know the syntax and limits of which.

I've seen there is a Postfix Completion whose expression adopts the following syntax: number1, number2.par and it transforms it into (number1, number2). I rather how could that be done and which syntax does it use in order to achieve that.

I've been searching information in the JetBrain's oficial page but didn't help much. Is it even possible to create a Porfix Completion whit that estructure?

Same question in spanish in this link

In a nutshell, how can I create a Postfix Completion with the following structure in PyCharm IDE:

Before:

1, 2.par

After:

(1, 2)
1

There are 1 best solutions below

1
Mikhail Tarabrikov On

This particular completion have been added by default: (screenshot of settings window). You can also create custom completions following this guide.