UsingVimWithDjango: django_url_snippets.vim

File django_url_snippets.vim, 544 bytes (added by Kenneth Belitzky, 16 years ago)

SnippetsEmu for urls.py

Line 
1if !exists('loaded_snippet') || &cp
2 finish
3endif
4
5let st = g:snip_start_tag
6let et = g:snip_end_tag
7let cd = g:snip_elem_delim
8
9exec "Snippet urlpatterns urlpatterns = patterns('".st.et."',<CR>".st.et."<CR>)"
10exec "Snippet urlplus urlpatterns += patterns('".st.et."',<CR>".st.et."<CR>)"
11exec "Snippet urli (r'^".st.et."/', include('".st.et."')),<CR>".st.et.""
12exec "Snippet urlf url(r'".st.et."/$', ".st.et.", name='".st.et."'),<CR>".st.et.""
13exec "Snippet urlfp url(r'".st.et."/$', ".st.et.", {".st.et."}, name='".st.et."'),<CR>".st.et.""
Back to Top