diff --git a/zencoding.vim b/zencoding.vim index 66edc7d..4d93da5 100644 --- a/zencoding.vim +++ b/zencoding.vim @@ -78,20 +78,21 @@ inoremap ZenCodingExpandAbbr u:call zen_expand(0)a inoremap ZenCodingExpandWord u:call zen_expand(1)a vnoremap ZenCodingExpandVisual :call zen_expand(2) +let s:target = expand(':h') =~ '[\\/]plugin$' ? '' : '' if !exists('g:user_zen_expandword_key') let g:user_zen_expandword_key = '.' endif if !hasmapto(g:user_zen_expandword_key, 'i') - exe "imap " . g:user_zen_expandword_key . " ZenCodingExpandWord" + exe "imap " . s:target . " " . g:user_zen_expandword_key . " ZenCodingExpandWord" endif if !exists('g:user_zen_expandabbr_key') let g:user_zen_expandabbr_key = ',' endif if !hasmapto(g:user_zen_expandabbr_key, 'i') - exe "imap " . g:user_zen_expandabbr_key . " ZenCodingExpandAbbr" + exe "imap " . s:target . " " . g:user_zen_expandabbr_key . " ZenCodingExpandAbbr" endif if !hasmapto(g:user_zen_expandabbr_key, 'v') - exe "vmap " . g:user_zen_expandabbr_key . " ZenCodingExpandVisual" + exe "vmap " . s:target . " " . g:user_zen_expandabbr_key . " ZenCodingExpandVisual" endif if exists('s:zen_settings') && g:zencoding_debug == 0