Whenever this shortcut runs the active document will be formatted with autopep8. Let's see how to work with and run Python inside of Visual Studio Code. Then simply assign a shortcut keys for the command. Python is one of the most popular and easy to learn languages, which is why it is often one of the first languages you learn. Create a keyboard shortcut for CodeBeautifierįilter shortcuts for:.Set CLI arguments: $(FileName) which will find the active document.Set formatter application: \Scripts\autopep8.exe).Inside the extension options you can add a language profile for python. Install the CodeBeautifier VS 2019 extension, which enables us to run the formatter CLI from within visual studio.Ĭonfigure CodeBeautifier for python projects.Įxtensions > Manobit > CodeBeautifier > Options install the autopep8 python formatting module. You could use something like Visual Commander to chain (save, then format) commands. Limitations: file must be saved before running this formatting command, otherwise autopep8 will format the outdated file and overwrite your changes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |