Skip to content Skip to sidebar Skip to footer

Is There A Shortcut For Html Blocks {%%} In Pycharm?

I am using HTML blocks like {% block content %} frequently but having to type out the brackets and percentage symbols is a hassle. Is there a shortcut or other way to automate this

Solution 1:

There is a Live Template for {% code block %}.

  1. Press Ctrl + J (or go to Code>Insert Live Template).

  2. Start typing block (the name of the template) to filter the list.

    enter image description here

  3. Press Enter (or click) after selecting the name from the list, and the template is inserted.

    enter image description here

  4. You can find the block template at File>Settings>Editor>Live Templates>Django>block. (In case you want to Configure the Live Template).

    enter image description here

Post a Comment for "Is There A Shortcut For Html Blocks {%%} In Pycharm?"