I am using VS Code to write Python code. Although it supports auto-complete for function names, I find it inconvenient that I have to manually type the open and close parentheses each time.
For example, if I select "print" from the auto-complete list, it still does not auto-complete as "print()", so I have to type the "()" manually.
Is there some setting in VS Code to enable auto-completion of the parentheses?
CodePudding user response:
No, there is no option to make the auto-complete feature automatically insert the parentheses as you described. You simply have to type them yourself.
Considering the example you gave in the question, the problem is that print
is a valid expression in itself—it can be used as an argument to a function/method. Thus, it may not necessarily even be a function call. If you want to make it a function call, you need to type the parentheses.