Formatting code in Notepad++

Is there a keyboard shortcut to format code in Notepad++ ? I’m mainly working with HTML, CSS and Python code. For example: <title>{% block title %} {% endblock %}</title> <link rel=”stylesheet” href=”https://stackoverflow.com/media/style.css” type=”text/css” media=”screen” /> </head> To: <head> <title> {% block title %} {% endblock %} </title> <link rel=”stylesheet” href=”https://stackoverflow.com/media/style.css” type=”text/css” media=”screen” /> </head> I … Read more

How can I break up this long line in Python?

How would you go about formatting a long line such as this? I’d like to get it to no more than 80 characters wide: logger.info(“Skipping {0} because its thumbnail was already in our system as {1}.”.format(line[indexes[‘url’]], video.title)) Is this my best option? url = “Skipping {0} because its thumbnail was already in our system as … Read more

How do you format code on save in VS Code

I would like to automatically format TypeScript code using the build-in formatter when I save a file in Visual Studio Code. I’m aware of the following options, but none of them is good enough: Format manually Shift + Alt + F Format on type “editor.formatOnType”: true It formats the line when you press enter. Unfortunatelly, … Read more