Hi I want to ask if it's possible to enable auto closing curly brackets in f-strings in Visual Studio Code. In Python you use often f-strings and therefore you need curly brackets.
print(f"Hello {name}!")
I already found something but I don't know if that feature is already implemented and if not if I can implement it with external plugins?: https://github.com/microsoft/vscode-python/issues/13673
Use the "Always" Auto Closing Brackets setting, but limit it to Python in your settings.json:
"[python]": {
"editor.autoClosingBrackets": "always"
}
VS Code has this auto closing brackets feature built-in in the editor. It's just disabled by default if you use it inside a string. To make it always close the brackets, Go to File > Preferences > Text Editor > Auto Closing Brackets
then change the value from 'languageDefined' to 'Always'. The Option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With