Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi! I created a plugin called django-plus.vim and would like UltiSnips to work with it since Django is an exceptional case in Vim.
The
django
filetype is considered a text template in Vim. But, for users to easily enable the Django snippets in Python scripts, thepython.django
filetype can be used. This causes some problems since plugins might not consider the dotted filetype, and filetypes likemarkdown.django
oryaml.django
(or evenpython.django
) should actually be includinghtmldjango.snippets
.The other problem is that using
:UltisnipsEdit
without arguments, one would expectdjango.snippets
to be loaded, butpython.snippets
is loaded instead. The filetype would need to bedjango.python
, but will break syntax highlighting in Python scripts.django-plus.vim
reliably detects files in a Django project and setsb:is_django
and leaves the filetype alone. I attempted to manually callUltiSnips#FileTypeChanged()
andUltiSnipsAddFiletypes django
in anafter/ftplugin
scripts, but that isn't reliable since other plugins can re-setfiletype
.This shouldn't affect anyone who doesn't have
django-plus.vim
installed. If there's a better way to do this, let me know.