Changes between Version 18 and Version 19 of UsingVimWithDjango
- Timestamp:
- Oct 9, 2006, 6:23:59 AM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UsingVimWithDjango
v18 v19 36 36 }}} 37 37 38 The following is a collection of Django specific abbreviations for use with the plugin (using the default start and end tags: '<{' and '}>'): 38 The following is an example collection of Django specific abbreviations for use with the plugin. More examples can be found in the [http://snippetsemu.googlecode.com/svn/trunk/after/ftplugin/ subversion repository]. Please email the author with any of your own additions (f dot ingram dot lists at gmail dot com): 39 39 40 Models: 40 41 {{{ … … 50 51 51 52 Templates: 52 Templates should be used with different tag delimiters as they will no doubt contain (X)HTML which will confuse the plugin. Assuming start and end tags are '@':53 53 54 54 {{{ 55 Iabbr fore {% for @entry@ in @list@ %}<CR>{{ @entry@.@@ }}<CR>@@{% endfor %}<CR>@@55 Iabbr fore {% for <{entry}> in <{list}> %}<CR>{{ <{entry}>.<{}> }}<CR><{}>{% endfor %}<CR><{}> 56 56 }}} 57 57 58 58 59 === XML .vim ===60 The [http://www.vim.org/scripts/script.php?script_id=301 xml .vim] plugin is really useful for editing XML and HTML files. It makes tag completion easy and allows you to bounce between start and end tags.59 === XMLEdit.vim === 60 The [http://www.vim.org/scripts/script.php?script_id=301 xmledit.vim] plugin is really useful for editing XML and HTML files. It makes tag completion easy and allows you to bounce between start and end tags. 61 61 62 62 === Syntax for templates === … … 83 83 The [http://www.vim.org/scripts/script.php?script_id=69 Project] plugin adds IDE file organisation functionality to Vim. 84 84 85 Something like the following could be used to view a project's files. 85 Something like the following could be used to view a project's files. It looks scary but is definatly worth trying. 86 86 87 87 {{{ 88 88 Django Project=/path/to/project CD=. filter="*.py" { 89 __init__.py90 89 settings.py 91 90 urls.py 92 91 apps=apps { 93 __init__.py94 92 app1=app1Dir { 95 __init__.py96 93 views.py 97 94 models=app1ModelsDir { 98 __init__.py99 95 app1models.py 100 96 } 101 97 } 102 98 app2=app2Dir { 103 __init__.py104 99 views.py 105 100 models=app2modelsDir { 106 __init__.py107 101 app2Dir.py 108 102 }