diff --git a/TUTORIAL b/TUTORIAL index 66b0860..ad46041 100644 --- a/TUTORIAL +++ b/TUTORIAL @@ -83,7 +83,7 @@ Tutorial of zencoding.vim
  • --------------------- - and type 'J' + and type 'm' --------------------- < - If you select part of line include
  • and type |J|, it will be following. + If you select part of line include
  • and type |m|, it will be + following. >
    • diff --git a/plugin/zencoding.vim b/plugin/zencoding.vim index 13d28b7..45d9289 100644 --- a/plugin/zencoding.vim +++ b/plugin/zencoding.vim @@ -1,7 +1,7 @@ "============================================================================= " File: zencoding.vim " Author: Yasuhiro Matsumoto -" Last Change: 22-Nov-2011. +" Last Change: 17-Jan-2012. " Version: 0.58 " WebPage: http://github.com/mattn/zencoding-vim " Description: vim plugins for HTML and CSS hi-speed coding. @@ -111,6 +111,7 @@ function! s:install_plugin() \ {'mode': 'n', 'var': 'user_zen_imagesize_key', 'key': 'i', 'plug': 'ZenCodingImageSize', 'func': ':call zencoding#imageSize()'}, \ {'mode': 'i', 'var': 'user_zen_togglecomment_key', 'key': '/', 'plug': 'ZenCodingToggleComment', 'func': ':call zencoding#toggleComment()a'}, \ {'mode': 'n', 'var': 'user_zen_togglecomment_key', 'key': '/', 'plug': 'ZenCodingToggleComment', 'func': ':call zencoding#toggleComment()'}, + \ {'mode': 'v', 'var': 'user_zen_mergelines_key', 'key': 'm', 'plug': 'ZenCodingMergeLines', 'func': ':call zencoding#mergeLines()'}, \ {'mode': 'i', 'var': 'user_zen_splitjointag_key', 'key': 'j', 'plug': 'ZenCodingSplitJoinTagInsert', 'func': ':call zencoding#splitJoinTag()a'}, \ {'mode': 'n', 'var': 'user_zen_splitjointag_key', 'key': 'j', 'plug': 'ZenCodingSplitJoinTagNormal', 'func': ':call zencoding#splitJoinTag()'}, \ {'mode': 'i', 'var': 'user_zen_removetag_key', 'key': 'k', 'plug': 'ZenCodingRemoveTag', 'func': ':call zencoding#removeTag()a'}, @@ -125,10 +126,14 @@ function! s:install_plugin() exe item.mode . 'noremap ' . item.plug . ' ' . item.func endif if !exists('g:' . item.var) - exe 'let g:' . item.var . " = '" . g:user_zen_leader_key . item.key . "'" endif - if len(maparg(eval('g:' . item.var), item.mode)) == 0 - exe item.mode . 'map ' . eval('g:' . item.var) . ' ' . item.plug + if exists('g:' . item.var) + let key = eval('g:' . item.var) + else + let key = g:user_zen_leader_key . item.key + endif + if len(maparg(key, item.mode)) == 0 + exe item.mode . 'map ' . key . ' ' . item.plug endif endfor endfunction