Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emmet in Django templater #302

Open
delminskii opened this issue Oct 24, 2015 · 14 comments
Open

Emmet in Django templater #302

delminskii opened this issue Oct 24, 2015 · 14 comments

Comments

@delminskii
Copy link

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?

@mattn
Copy link
Owner

mattn commented Oct 25, 2015

please explain what you expected?

@delminskii
Copy link
Author

@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).
12

@mattn
Copy link
Owner

mattn commented Oct 25, 2015

what is filetype of the file?

@delminskii
Copy link
Author

@mattn The filetype is html

@mattn
Copy link
Owner

mattn commented Oct 25, 2015

I still not understand what is your issue.

On 10/25/15, Nikolay notifications@github.com wrote:

@mattn The filetype is html


Reply to this email directly or view it on GitHub:
#302 (comment)

  • Yasuhiro Matsumoto

@delminskii
Copy link
Author

@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:
`

` and result should be: `{% content %}
`

But there's only the next:
{% content %} .hello>#world[tab],, i.e. this plugin hasn't power here.

@mattn
Copy link
Owner

mattn commented Oct 26, 2015

Could you please try latest commit?

@delminskii
Copy link
Author

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

@mattn
Copy link
Owner

mattn commented Oct 26, 2015

where is your cursor? please show me BEFORE and AFTER you expected.

@dan-gamble
Copy link

The filetype is normally htmldjango not html. Have you tried adding that to autocmd FileType html,htmldjango,css,scss EmmetInstall?

@delminskii
Copy link
Author

@DanGamble89 I haven't tried that, sorry. Your solution works great! Thanks. I haven't known about that. This topic may be closed now.

@dan-gamble
Copy link

@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

@delminskii
Copy link
Author

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

@LaxmanMaharjan
Copy link

The filetype is normally htmldjango not html. Have you tried adding that to autocmd FileType html,htmldjango,css,scss EmmetInstall?

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants