10 | | == django-mode == |
11 | | |
12 | | [http://cavedoni.com/ I]’ve started hacking on an editing mode for Django templates in Emacs. (Please note that this is the first time I ever do Emacs Lisp, and that what I currently have is nothing more than a start. If you can come up with fixes or improvements, these are much appreciated). |
13 | | |
14 | | The most obvious benefit that it provides at the moment is syntax highlighting of variables and blocks. |
15 | | |
16 | | It knows about the Django default tag names and uses a different coloring for comments. At the moment it is configured to automatically kick-in for files with extension `.djhtml` (I made it up that way, in order not to clash with other defaults one may have with .html files). Of course you can invoke it with `M-x django-mode` in any buffer. |
17 | | |
18 | | You can get it here: http://unicoders.org/code/hacks/trunk/django-mode.el |
19 | | |
20 | | Put it somewhere where Emacs can find it then add this line to your `.emacs` file: |
21 | | |
22 | | {{{ |
23 | | (load "django-mode.el") |
24 | | }}} |
25 | | |
26 | | This is a sample screenshot of the results with the “Charcoal Black” [http://www.emacswiki.org/cgi-bin/wiki?ColorTheme color theme]: |
27 | | |
28 | | {{{ |
29 | | #!html |
30 | | <img src="http://code.djangoproject.com/attachment/wiki/Emacs/emacs-django-template.png?format=raw" alt="Screenshot of Django template in GNU Emacs, Mac OS X"> |
31 | | }}} |
32 | | |
33 | | == django-html-mode == |
34 | | |
35 | | There is another emacs django templete mode. It is derived mode from html(sgml). |
36 | | |
37 | | * Elisp Code(.html) |
38 | | [http://tsgates.cafe24.com/wp-content/uploads/2007/01/django-html-mode1.html] |
39 | | * Download(.el) |
40 | | [http://tsgates.cafe24.com/elisp/django-html-mode.el] |
41 | | * Example(.html) |
42 | | [http://tsgates.cafe24.com/wp-content/uploads/2007/01/django-html-mode-ex.html] |
43 | | |
44 | | {{{ |
45 | | #!html |
46 | | <img src="http://tsgates.cafe24.com/elisp/404.JPG" alt="Screenshot of Django template in GNU Emacs, Windows"> |
47 | | }}} |
48 | | |
49 | | === Improved version === |
50 | | |
51 | | There is an updated and improved version of this mode on: [https://code.edge.launchpad.net/~eopadoan/+junk/django-html-mode] |
52 | | * '''Updated the supported tags''' to current (django 1.0b3). |
53 | | * Added '''auto-close''' command ( {{{C-c ]}}} ). |
54 | | |
55 | | To get, run on a shell: |
56 | | {{{ |
57 | | bzr branch lp:~eopadoan/+junk/django-html-mode |
58 | | }}} |
59 | | |
60 | | == django-html-mumamo-mode == |
| 10 | == django-html-mumamo-mode == (works well) |
| 74 | |
| 75 | The django-mode yasnippets code depend on python-mode.el, so it also has to be downloaded. Note: there is a difference between python.el (which comes with the native Emacs distribution) and python-mode.el, which has to be downloaded separately. |
| 76 | |
| 77 | Also, if you use django-html-mumamo-mode, you should not use Ysnippet since the automatic template tag indenting will not function correctly with the Ysnippet django-html-mode and django-mode code loaded. |
| 78 | |
| 79 | == django-mode == (OLD -- download link does not work) |
| 80 | |
| 81 | [http://cavedoni.com/ I]’ve started hacking on an editing mode for Django templates in Emacs. (Please note that this is the first time I ever do Emacs Lisp, and that what I currently have is nothing more than a start. If you can come up with fixes or improvements, these are much appreciated). |
| 82 | |
| 83 | The most obvious benefit that it provides at the moment is syntax highlighting of variables and blocks. |
| 84 | |
| 85 | It knows about the Django default tag names and uses a different coloring for comments. At the moment it is configured to automatically kick-in for files with extension `.djhtml` (I made it up that way, in order not to clash with other defaults one may have with .html files). Of course you can invoke it with `M-x django-mode` in any buffer. |
| 86 | |
| 87 | You can get it here: http://unicoders.org/code/hacks/trunk/django-mode.el (link dead) |
| 88 | |
| 89 | Put it somewhere where Emacs can find it then add this line to your `.emacs` file: |
| 90 | |
| 91 | {{{ |
| 92 | (load "django-mode.el") |
| 93 | }}} |
| 94 | |
| 95 | This is a sample screenshot of the results with the “Charcoal Black” [http://www.emacswiki.org/cgi-bin/wiki?ColorTheme color theme]: |
| 96 | |
| 97 | {{{ |
| 98 | #!html |
| 99 | <img src="http://code.djangoproject.com/attachment/wiki/Emacs/emacs-django-template.png?format=raw" alt="Screenshot of Django template in GNU Emacs, Mac OS X"> |
| 100 | }}} |
| 101 | |
| 102 | == django-html-mode == |
| 103 | |
| 104 | There is another emacs django templete mode. It is derived mode from html(sgml). |
| 105 | |
| 106 | === Improved version === |
| 107 | |
| 108 | There is an updated and improved version of this mode on: [https://code.edge.launchpad.net/~eopadoan/+junk/django-html-mode] |
| 109 | * '''Updated the supported tags''' to current (django 1.0b3). |
| 110 | * Added '''auto-close''' command ( {{{C-c ]}}} ). |
| 111 | |
| 112 | To get, run on a shell: |
| 113 | {{{ |
| 114 | bzr branch lp:~eopadoan/+junk/django-html-mode |
| 115 | }}} |
| 116 | |
| 117 | Note: The django-html-mode code does not appear to support template tag indentation. |