diff --git a/zencoding.vim b/zencoding.vim index ac983a7..2314838 100644 --- a/zencoding.vim +++ b/zencoding.vim @@ -906,9 +906,9 @@ function! s:zen_toString(...) let str .= " />\n" else if stridx(','.s:zen_settings[type]['block_elements'].',', ','.current['name'].',') != -1 && len(current['child']) - let str .= ">\n\n" + let str .= ">\n|\n" else - let str .= ">\n" + let str .= ">|\n" endif endif endif @@ -938,6 +938,9 @@ function! s:zen_expand() let items = s:zen_parseIntoTree(part, type)['child'] let expand = len(items) ? s:zen_toString(items[0], type) : '' if len(expand) + let expand = substitute(expand, '|', '$cursor$', '') + let expand = substitute(expand, '|', '', 'g') + let expand = substitute(expand, '\$cursor\$', '|', '') if expand !~ '|' let expand .= '|' endif @@ -962,7 +965,7 @@ function! ZenExpand(abbr, type) return '' endfunction -inoremap ZenCodingExpand =zen_expand()?\|a +inoremap ZenCodingExpand =zen_expand()/\|a imap , ZenCodingExpand function! s:zen_mergeConfig(lhs, rhs)