tweekmonster / django-plus.vim

:guitar: Improvements to the handling of Django related files in Vim
MIT License
179 stars 15 forks source link

what's python file filetype? #6

Open gatspy opened 8 years ago

gatspy commented 8 years ago

b:is_django show equal 1, UltiSnips still used python.snippets. :set filetype show equal python. when detected project is django, can automatically change filetype? i use ycm + ultisnips. Is this what is the problem ?

tweekmonster commented 8 years ago

Can you confirm that django is not set in UltiSnips with:

:execute g:_uspy 'print(UltiSnips_Manager._buffer_filetypes['.bufnr('%').'])'

I think it'll be better if I submit a PR to UltiSnips to work with django-plus.

tweekmonster commented 8 years ago

Now that I re-read your issue, are you saying you want the filetype to be set to django? Even if the filetype is python, UltiSnips should still use python.snippets and django.snippets.

tweekmonster commented 8 years ago

@gatspy https://github.com/SirVer/ultisnips/pull/730

gatspy commented 8 years ago

:execute g:_uspy 'print(UltiSnips_Manager._buffer_filetypes['.bufnr('%').'])' show results['python', 'all'] . au FileType python set ft=python.django au FileType html set ft=htmldjango.html add this settings in virmc, ultisnipts work fine, but django-plus autocomplete can't working. ycm conflict with this plug? i decided use your dotfiles to try django-plus. Thank you for your enthusiastic reply.

tweekmonster commented 8 years ago

Yes, there's currently an issue with YCM: #5

I don't use YCM, so I'm not sure how to fix it at this time.