moveNextPrev

This commit is contained in:
mattn
2012-05-31 17:47:14 +09:00
parent 06dd83dad3
commit 7fe889d214
5 changed files with 80 additions and 14 deletions

View File

@@ -28,7 +28,8 @@ function! zencoding#lang#slim#toString(settings, current, type, inline, filters,
let val = substitute(val, '\(\$\+\)\([^{]\|$\)', '\=printf("%0".len(submatch(1))."d", itemno+1).submatch(2)', 'g')
endwhile
let attr = substitute(attr, '\$$', itemno+1, '')
if val =~ '\s'
let sval = substitute(val, '\${cursor}', '', '')
if sval =~ '\s' || sval == ''
let str .= ' ' . attr . '="' . val . '"'
else
let str .= ' ' . attr . '=' . val
@@ -116,3 +117,13 @@ endfunction
function! zencoding#lang#slim#balanceTag(flag) range
endfunction
function! zencoding#lang#slim#moveNextPrev(flag)
let pos = search('""\|\(^\s*|\s*\zs\)', a:flag ? 'Wpb' : 'Wp')
if pos == 2
startinsert!
elseif pos != 0
silent! normal! l
startinsert
endif
endfunction