emmet-vim
emmet-vim copied to clipboard
Emmet in Django templater
Hello, I have a question. Does this plugin work in django template? It works OK in raw html file, but not in default django template language (*.html
also). Can I fix it manually?
please explain what you expected?
@mattn It's hard to write raw html for me, so I've chosen this plugin to achieve that goal, but it doesn't work in django template which contains some blocks (look at the attachment, please).
what is filetype of the file?
@mattn The filetype is html
I still not understand what is your issue.
On 10/25/15, Nikolay [email protected] wrote:
@mattn The filetype is html
Reply to this email directly or view it on GitHub: https://github.com/mattn/emmet-vim/issues/302#issuecomment-150920851
- Yasuhiro Matsumoto
@mattn emmet-vim doesn't work in django template (html). For example, I have:
{% content %}
then I append:
.hello>#world
then I try toggling this plugin by hotkey ([tab],
for me) and nothing happens, but I expect:
`
But there's only the next:
{% content %} .hello>#world[tab],
, i.e. this plugin hasn't power here.
Could you please try latest commit?
@mattn I've updated all plugins from my .vimrc
by Vundle
plugin-manager, and there's still a problem. I may give you an example template file (look at this, please: http://pastebin.com/3ZLZtebZ) ... (copy-paste into test.html on your local machine, then reopen this file and then block
, if
, endif
... etc django-template tokens must be highlighted by vim, as you may see on the piece of my vim-screen above) and maybe you should play around with emmet there to reproduce problem.
where is your cursor? please show me BEFORE and AFTER you expected.
The filetype is normally htmldjango
not html
. Have you tried adding that to autocmd FileType html,htmldjango,css,scss EmmetInstall
?
@DanGamble89 I haven't tried that, sorry. Your solution works great! Thanks. I haven't known about that. This topic may be closed now.
@delminskii Happy to help :) I had the same problem this morning but if you run :set filetype?
it will tell you what the filetype of the file is
@DanGamble89 Okay, I bear it in the mind for the future. I tried django
only in autocmd FileType
, but this didn't help. So now problem is solved.
The filetype is normally
htmldjango
nothtml
. Have you tried adding that toautocmd FileType html,htmldjango,css,scss EmmetInstall
?
Thank you