From 4110fb0f7b13f20e1136da18e12597a4c978cc3a Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Mon, 26 Oct 2015 09:44:07 +0900 Subject: [PATCH] ignore django template --- autoload/emmet/lang/html.vim | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/autoload/emmet/lang/html.vim b/autoload/emmet/lang/html.vim index b970402..0bdd956 100644 --- a/autoload/emmet/lang/html.vim +++ b/autoload/emmet/lang/html.vim @@ -1,6 +1,6 @@ let s:mx = '\([+>]\|[<^]\+\)\{-}\s*' \ .'\((*\)\{-}\s*' -\ .'\([@#.]\{-}[a-zA-Z_\!][a-zA-Z0-9:_\!\-$]*\|{\%([^$}]\+\|\$#\|\${\w\+}\|\$\+\)*}*[ \t\r\n}]*\|\[[^\]]\+\]\)' +\ .'\([@#.]\{-}[a-zA-Z_\!][a-zA-Z0-9:_\!\-$]*\|{\%([^%$}]\+\|\$#\|\${\w\+}\|\$\+\)*}*[ \t\r\n}]*\|\[[^\]]\+\]\)' \ .'\(' \ .'\%(' \ .'\%(#{[{}a-zA-Z0-9_\-\$]\+\|#[a-zA-Z0-9_\-\$]\+\)' @@ -22,6 +22,13 @@ function! emmet#lang#html#findTokens(str) abort endif let pos = stridx(str, tag, pos) + len(tag) endwhile + while 1 + let tag = matchstr(str, '{%[^%]\{-}%}', pos) + if len(tag) == 0 + break + endif + let pos = stridx(str, tag, pos) + len(tag) + endwhile let last_pos = pos while len(str) > 0 let token = matchstr(str, s:mx, pos)