Snippets for PyCharm (specifically django templates)

1

I am in the process of moving from SublimeText to PyCharm for python development. One feature I loved in Sublime were the Djaneiro Django template snippets. In a template, I could just type include and it would expand to {% include "<cursor>" %}. Is there something like this for PyCharm? Googling didn't reveal anything.

update: I started registering the missing tags myself. PyCharm stores these in an XML file so I figured I'd share my efforts here.

Christof

Posted 2016-05-27T07:50:41.467

Reputation: 113

1Maybe you are looking for 'Live templates'? Under the File>Settings>Editor. – Alexiy – 2016-05-27T09:13:54.970

Well look at that, there are even some django templates, awesome! I wonder why they only have a small subset of all template tags? – Christof – 2016-05-27T09:32:21.750

I have no idea. You can make custom ones, though. – Alexiy – 2016-05-27T18:11:34.593

1Do you want to copy/paste your comment as answer? Then I'll close this question. – Christof – 2016-05-30T06:51:56.520

Answers

1

The equivalent of template snippets in PyCharm is 'Live Templates' under File>Settings>Editor. You can create custom ones by clicking plus on the right. This applies to most IDEs made by Jetbrains.

Alexiy

Posted 2016-05-27T07:50:41.467

Reputation: 247

1

Thanks again. I started creating the missing template tags and put them up here: https://github.com/chlab/pycharm-django-live-templates.

– Christof – 2016-05-31T13:29:19.233

Cheers, good luck. – Alexiy – 2016-06-01T03:13:58.000