Added emmet#expandAbbrIntelligent() to you to do:

imap <expr> <tab> emmet#expandAbbrIntelligent("\<tab>")
This commit is contained in:
mattn
2013-10-15 09:26:25 +09:00
parent 32a1dac905
commit 4c371b5fa6

View File

@@ -101,6 +101,13 @@ function! emmet#parseIntoTree(abbr, type)
return emmet#lang#{rtype}#parseIntoTree(abbr, type)
endfunction
function! emmet#expandAbbrIntelligent(feedkey)
if !emmet#isExpandable()
return a:feedkey
endif
return "\<plug>(EmmetExpandAbbr)"
endfunction
function! emmet#isExpandable()
let line = getline('.')
if col('.') < len(line)