mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-09 03:54:47 +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)
|
return emmet#lang#{rtype}#parseIntoTree(abbr, type)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! emmet#expandAbbrIntelligent(feedkey)
|
||||||
|
if !emmet#isExpandable()
|
||||||
|
return a:feedkey
|
||||||
|
endif
|
||||||
|
return "\<plug>(EmmetExpandAbbr)"
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! emmet#isExpandable()
|
function! emmet#isExpandable()
|
||||||
let line = getline('.')
|
let line = getline('.')
|
||||||
if col('.') < len(line)
|
if col('.') < len(line)
|
||||||
|
|||||||
Reference in New Issue
Block a user