django-plus.vim icon indicating copy to clipboard operation
django-plus.vim copied to clipboard

what's python file filetype?

Open gatspy opened this issue 7 years ago • 5 comments

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 ?

gatspy avatar Aug 04 '16 02:08 gatspy

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 avatar Aug 04 '16 03:08 tweekmonster

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 avatar Aug 04 '16 04:08 tweekmonster

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

tweekmonster avatar Aug 04 '16 05:08 tweekmonster

: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.

gatspy avatar Aug 04 '16 08:08 gatspy

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.

tweekmonster avatar Aug 04 '16 16:08 tweekmonster