Code

Changes between Version 18 and Version 19 of UsingVimWithDjango


Ignore:
Timestamp:
10/09/06 04:23:59 (8 years ago)
Author:
lllama
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UsingVimWithDjango

    v18 v19  
    3636}}} 
    3737 
    38 The following is a collection of Django specific abbreviations for use with the plugin (using the default start and end tags: '<{' and '}>'): 
     38The 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 
    3940Models: 
    4041{{{ 
     
    5051 
    5152Templates: 
    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 '@': 
    5353 
    5454{{{ 
    55 Iabbr fore {% for @entry@ in @list@ %}<CR>{{ @entry@.@@ }}<CR>@@{% endfor %}<CR>@@ 
     55Iabbr fore {% for <{entry}> in <{list}> %}<CR>{{ <{entry}>.<{}> }}<CR><{}>{% endfor %}<CR><{}> 
    5656}}} 
    5757 
    5858 
    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 === 
     60The [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. 
    6161 
    6262=== Syntax for templates ===  
     
    8383The [http://www.vim.org/scripts/script.php?script_id=69 Project] plugin adds IDE file organisation functionality to Vim. 
    8484 
    85 Something like the following could be used to view a project's files. 
     85Something like the following could be used to view a project's files. It looks scary but is definatly worth trying. 
    8686 
    8787{{{ 
    8888Django Project=/path/to/project CD=. filter="*.py" { 
    89  __init__.py 
    9089 settings.py 
    9190 urls.py 
    9291 apps=apps { 
    93   __init__.py 
    9492  app1=app1Dir { 
    95    __init__.py 
    9693   views.py 
    9794   models=app1ModelsDir { 
    98     __init__.py 
    9995    app1models.py 
    10096   } 
    10197  } 
    10298  app2=app2Dir { 
    103    __init__.py 
    10499   views.py 
    105100   models=app2modelsDir { 
    106     __init__.py 
    107101    app2Dir.py 
    108102   }