When I'm writing Django templates with PyCharm it automatically closes them; this is reasonably helpful when I'm starting a new tag, but if my intention is to place some already existing content inside a different tag it tends to get a bit annoying, as I then have to delete or move the closing tag, e.g. I'll end up with something like this.
<div></div>Already existing text.
Is there any way of disabling this feature?
You can modify the smart keys functionality of the Editor by doing the following:
Settings --> Editor --> General --> Smart Keys
Apprently, there is a way to achieve this already in PyCharm.
Ctrl+Alt+T
Select the desired surround statement from the list. To do that, use the mouse cursor, up and down arrow keys, or a shortcut key displayed next to each element of the list.
Here is the relevant documentation for
Wrapping
Here is the documentation for
unwrapping
EDIT:
The Shortcut for Tags is
Ctrl+Alt+J
Here is the relevant documentation for
tags