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

@@ -1,7 +1,7 @@
"=============================================================================
" zencoding.vim
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
" Last Change: 30-May-2012.
" Last Change: 31-May-2012.
let s:save_cpo = &cpo
set cpo&vim
@@ -407,16 +407,14 @@ function! zencoding#expandAbbr(mode) range
endfunction
function! zencoding#moveNextPrev(flag)
if search('><\/\|\(""\)\|^\s*$', a:flag ? 'Wpb' : 'Wp') == 3
startinsert!
else
silent! normal! l
startinsert
endif
let type = zencoding#getFileType()
let rtype = len(globpath(&rtp, 'autoload/zencoding/lang/'.type.'.vim')) ? type : 'html'
return zencoding#lang#{rtype}#moveNextPrev(a:flag)
endfunction
function! zencoding#imageSize()
let rtype = len(globpath(&rtp, 'autoload/zencoding/lang/'.&ft.'.vim')) ? &ft : 'html'
let type = zencoding#getFileType()
let rtype = len(globpath(&rtp, 'autoload/zencoding/lang/'.type.'.vim')) ? type : 'html'
return zencoding#lang#{rtype}#imageSize()
endfunction
@@ -426,6 +424,12 @@ function! zencoding#toggleComment()
return zencoding#lang#{rtype}#toggleComment()
endfunction
function! zencoding#balanceTag(flag) range
let type = zencoding#getFileType()
let rtype = len(globpath(&rtp, 'autoload/zencoding/lang/'.type.'.vim')) ? type : 'html'
return zencoding#lang#{rtype}#balanceTag(a:flag)
endfunction
function! zencoding#splitJoinTag()
let curpos = getpos('.')
while 1
@@ -511,11 +515,6 @@ function! zencoding#removeTag()
endwhile
endfunction
function! zencoding#balanceTag(flag) range
let rtype = len(globpath(&rtp, 'autoload/zencoding/lang/'.&ft.'.vim')) ? &ft : 'html'
return zencoding#lang#{rtype}#balanceTag(a:flag)
endfunction
function! zencoding#anchorizeURL(flag)
let mx = 'https\=:\/\/[-!#$%&*+,./:;=?@0-9a-zA-Z_~]\+'
let pos1 = searchpos(mx, 'bcnW')