mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-06 10:44:24 +08:00
fix cursor placing for haml & slim. close #92
This commit is contained in:
@@ -68,6 +68,8 @@ function! zencoding#lang#haml#toString(settings, current, type, inline, filters,
|
||||
let str .= "\n" . indent . line . " |"
|
||||
endfor
|
||||
endif
|
||||
elseif len(current.child) == 0
|
||||
let str .= '${cursor}'
|
||||
endif
|
||||
if len(current.child) == 1 && len(current.child[0].name) == 0
|
||||
let text = current.child[0].value[1:-2]
|
||||
|
||||
@@ -48,6 +48,8 @@ function! zencoding#lang#slim#toString(settings, current, type, inline, filters,
|
||||
for line in split(text, "\n")
|
||||
let str .= indent . "| " . line . "\n"
|
||||
endfor
|
||||
elseif len(current.child) == 0
|
||||
let str .= '${cursor}'
|
||||
endif
|
||||
if len(current.child) == 1 && len(current.child[0].name) == 0
|
||||
let str .= "\n"
|
||||
|
||||
Reference in New Issue
Block a user