= Using TextMate with Django = !TextMate is a popular text editor for OS X. http://macromates.com/ (For those of us not lucky enough to have a mac, check out e http://e-texteditor.com - lets you use TextMate bundles and many of TextMate's features on Windows.) One of the most interesting features is the ability to define "snippets", abbreviations which can be expanded into larger blocks of text containing placeholders. TextMate organizes most of its features -- including snippets, macros, templates, and drag-and-drop behaviors -- into language-specific "bundles." There's a Django bundle, though it's not among the ones included with the application; you have to fetch it from the repository. It handles both Django templates and Django Python code. The bundle's Python snippets are built for the magic-removal branch of Django. = Install = {{{ % mkdir -p ~/Library/Application\ Support/TextMate/Bundles % cd ~/Library/Application\ Support/TextMate/Bundles % git clone https://github.com/textmate/python-django.tmbundle.git % git clone https://github.com/textmate/python-django-templates.tmbundle.git }}} Alternatively a svn repository is also available here : {{{ % svn co http://svn.textmate.org/trunk/Bundles/Python%20Django.tmbundle/ }}} Relaunch TextMate or choose Bundles -> Bundle Editor -> Reload Bundles to make the new bundles available. The !TextMate blog lists instructions here: http://macromates.com/blog/archives/2006/08/21/getting-more-bundles/ http://manual.macromates.com/en/bundles#installing_a_bundle The bundle resides at: http://svn.textmate.org/trunk/Bundles/Python%20Django.tmbundle The Django-Python syntax in particular is a work in progress, and suggestions and contributions are welcome. == Themes == Homages to Django and the pleasant color scheme of its website. Created by Jannis Leidel. === Django === [[Image(django_textmate_theme_2.png, top)]] [http://code.djangoproject.com/attachment/wiki/TextMate/django_textmate_theme.png larger], [http://code.djangoproject.com/attachment/wiki/TextMate/Django.tmTheme.zip download] === Django (Smoothy) === [[Image(http://jannisleidel.com/wp-content/uploads/2007/05/smoothy.png, top)]] [http://code.djangoproject.com/attachment/wiki/TextMate/django_textmate_theme.png larger], [https://code.djangoproject.com/attachment/wiki/TextMate/django-smoothytmtheme.zip download] == Syntax coloring examples == === Stock HTML mode === [[Image(http://e-scribe.com/img/django_textmate/templ_html.png, top)]] === Django template mode === [[Image(http://e-scribe.com/img/django_textmate/templ_django.png, top)]] === Stock Python mode === [[Image(http://e-scribe.com/img/django_textmate/code_python.png, top)]] === Django Python mode === [[Image(http://e-scribe.com/img/django_textmate/code_django.png, top)]]