From 40a44a60c83946f2b15e42496b42bfe8f4319a1f Mon Sep 17 00:00:00 2001 From: mattn Date: Thu, 4 Mar 2010 19:39:03 +0900 Subject: [PATCH] text comment block. --- zencoding.vim | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/zencoding.vim b/zencoding.vim index b46ba94..7c28f1e 100644 --- a/zencoding.vim +++ b/zencoding.vim @@ -1276,17 +1276,33 @@ endfunction function! s:zen_toggleComment() let pos = getpos('.') - call search('<', 'bW') - if searchpair('', 'bcW') - exe "normal! d5l" - call search('\(]\+>\|<[^/>]\+/>\) -->', 'ceW') - exe "normal! d4h" - let pos[2] -= 5 - elseif searchpair('<[a-z]', '', '\(]\+>\|<[^/>]\+/>\)', 'bcW') - exe "normal! i', 'bcW') + exe "normal! d5l" + call search(' -->', 'ceW') + exe "normal! d4h" + let pos[2] -= 5 + elseif searchpair('[^\s]', '', '[^\s]', 'bcW') + exe "normal! Bi', 'bcW') + exe "normal! d5l" + call search('\(]\+>\|<[^/>]\+/>\) -->', 'ceW') + exe "normal! d4h" + let pos[2] -= 5 + elseif searchpair('<[a-z]', '', '\(]\+>\|<[^/>]\+/>\)', 'bcW') + exe "normal! i