Skip to content

Commit

Permalink
Add support for django-plus.vim
Browse files Browse the repository at this point in the history
  • Loading branch information
tweekmonster committed Aug 4, 2016
1 parent e8c485e commit 0571439
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion autoload/UltiSnips.vim
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,19 @@ function! UltiSnips#JumpForwards()
endfunction

function! UltiSnips#FileTypeChanged()
let ft = &ft
if exists('b:is_django')
" Additional filetypes for django-plus.vim
if ft =~# '\<python\>'
let ft = 'django.' . ft
elseif ft =~# '\<django\>'
let ft = 'htmldjango.' . ft
elseif ft =~# '\<htmldjango\>'
let ft .= '.html'
endif
endif
exec g:_uspy "UltiSnips_Manager.reset_buffer_filetypes()"
exec g:_uspy "UltiSnips_Manager.add_buffer_filetypes('" . &ft . "')"
exec g:_uspy "UltiSnips_Manager.add_buffer_filetypes('" . ft . "')"
return ""
endfunction

Expand Down

0 comments on commit 0571439

Please sign in to comment.