mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-06 18:54:27 +08:00
Added emmet#expandAbbrIntelligent() to you to do:
imap <expr> <tab> emmet#expandAbbrIntelligent("\<tab>")
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user