I have been programming Django in Sublime Text 3 for a while, and I always thought the oft-recommended Djaneiro package was way too heavy-handed.
Here are my criteria for a Django plugin for Sublime Text 3:
- I didn’t want bulky version-dependent snippets. Hitting Ctrl+Shift+p with Djaneiro gives you the option to insert around 100 snippets. Most of them are too short, too version-dependent, or just exotic and unneeded.
-
I didn’t want an Sublime Text 3 view dedicated to “Python (Django)”. I’d prefer to treat Python code as pure Python code, even when working in Django.
-
I wanted Django-flavored syntax highlighting in Django HTML templates. This is the “HTML (Django)” Sublime Text 3 view.
-
I wanted the Ctrl+/ comment shortcut to work on Django HTML templates. Djaneiro has a 6-year old bug where the wrong comment tag is inserted.
So, I cloned the Djaneiro plugin and deleted a bunch of the extras I didn’t want. I present to you: django-highlite.
To install, navigate to your Sublime Text 3 package directory (Preferences -> Browse Packages…), and clone the repository into it. Restart Sublime Text 3, or simply re-open your “Django (HTML)” views, and you are all set.
Leave a Reply