Code

Changes between Version 6 and Version 7 of UsingVimWithDjango


Ignore:
Timestamp:
01/09/06 08:27:52 (8 years ago)
Author:
Lllama
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UsingVimWithDjango

    v6 v7  
    66 
    77The [http://www.vim.org/scripts/script.php?script_id=1318 SnippetsEmu] plugin for Vim allows one to define abbreviations which can be expanded into larger blocks of text.  The abbreviations can also contain place markers which can be 'jumped to' in a similar manner to the macros defined in TextMate on OS X. 
     8 
     9One can add specific abbreviations for models or templates based on file contents.  Adding the following line to your ~/.vim/ftplugin/python.vim file (create it if you don't have it) will allow you to define abbreviations just for models: 
     10{{{ 
     11if getline(1) =~ 'from django.core import meta' 
     12    "Your abbreviations here 
     13endif 
     14}}} 
    815 
    916The following is a collection of Django specific abbreviations for use with the plugin (using the default start and end tags: '<' and '>'):