From 4c371b5fa69f98b858cb01879bbca76b34526bfa Mon Sep 17 00:00:00 2001 From: mattn Date: Tue, 15 Oct 2013 09:26:25 +0900 Subject: [PATCH] Added emmet#expandAbbrIntelligent() to you to do: imap emmet#expandAbbrIntelligent("\") --- autoload/emmet.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/autoload/emmet.vim b/autoload/emmet.vim index 7fe362a..5b1098a 100644 --- a/autoload/emmet.vim +++ b/autoload/emmet.vim @@ -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 "\(EmmetExpandAbbr)" +endfunction + function! emmet#isExpandable() let line = getline('.') if col('.') < len(line)