How can I stop PyCharm from autocomplete HTML and Django tags?

When I write Django templates with PyCharm, it automatically closes them; this is reasonably useful when I start a new tag, but if I intend to place some already existing content inside another tag, it tends to be a little annoying since I then need to remove or move the closed tag, for example. I ended up with something like this.

<div></div>Already existing text.

      

Is there a way to disable this feature?

+3


source to share


2 answers


You can change the functionality of the smart keys by following these steps:



  • Switch to Settings --> Editor --> General --> Smart Keys

  • Uncheck the "Insert end tag when tag ends" checkbox in the XML / HTML section.
+5


source


There seems to be a way to achieve this already in PyCharm.

  • Select the code snippet you want.
  • Perform one of the following actions:
  • From the main menu select "Code" | Surround With
  • Click Ctrl+Alt+T

  • The pop-up window displays a list of enclosing operators according to the context.

Select the desired surround description from the list. To do this, use the mouse cursor, the up and down arrows, or the keyboard shortcut next to each item in the list.

Here is the relevant documentation forWrapping



Here is the documentation forunwrapping

EDIT:

Shortcut for tags Ctrl+Alt+J

Here is the relevant documentation fortags

+2


source







All Articles