diff --git a/zencoding.vim b/zencoding.vim index 2314838..6db5669 100644 --- a/zencoding.vim +++ b/zencoding.vim @@ -2,7 +2,7 @@ " File: zencoding.vim " Author: Yasuhiro Matsumoto " Last Change: 19-Feb-2010. -" Version: 0.3 +" Version: 0.4 " WebPage: http://github.com/mattn/zencoding-vim " Description: vim plugins for HTML and CSS hi-speed coding. " SeeAlso: http://code.google.com/p/zen-coding/ @@ -18,7 +18,7 @@ " "_" is a cursor position. and type "," " +------------------------------------- " | -" | +" | " | " | " | @@ -35,14 +35,11 @@ " And type "," " +------------------------------------- " |
-" |
-" |
+" |
_
" |
" |
-" |
-" |
+" |
" |
-" | _ " +------------------------------------- " " Tips: @@ -63,6 +60,8 @@ " \ } " \} " +" You can set language attribute in html using zen_settings['lang']. +" " GetLatestVimScripts: 2981 1 :AutoInstall: zencoding.vim " script type: plugin @@ -74,6 +73,7 @@ let g:loaded_zencoding_vim = 1 unlet! s:zen_settings let s:zen_settings = { \ 'indentation': "\t", +\ 'lang': "en", \ 'css': { \ 'snippets': { \ '@i': '@import url(|);', @@ -594,7 +594,7 @@ let s:zen_settings = { \ ."\n\t${child}|\n\n" \ ."", \ 'html:5': "\n" -\ ."\n" +\ ."\n" \ ."\n" \ ." \n" \ ." \n" @@ -944,6 +944,7 @@ function! s:zen_expand() if expand !~ '|' let expand .= '|' endif + let expand = substitute(expand, '${lang}', s:zen_settings['lang'], 'g') silent! exec "normal! ".repeat("x", len(part)) let size = len(line) - len(part) let indent = repeat(s:zen_settings['indentation'], size) @@ -992,7 +993,7 @@ function! s:zen_mergeConfig(lhs, rhs) endfunction if exists('g:user_zen_settings') - call s:zen_mergeConfig(s:zen_settings, g:user_zen_settings) + call s:zen_mergeConfig(s:zen_settings, g:user_zen_settings) endif " test "echo ZenExpand('html:xt>div#header>div#logo+ul#nav>li.item-$*5>a', '') diff --git a/zencoding.vim.vimup b/zencoding.vim.vimup index 4236a19..cc05740 100644 --- a/zencoding.vim.vimup +++ b/zencoding.vim.vimup @@ -2,7 +2,7 @@ script_name: ZenCoding.vim script_id: '2981' script_type: utility script_package: zencoding.vim -script_version: '0.3' +script_version: '0.4' required_vim_version: '7.0' summary: vim plugins for HTML and CSS hi-speed coding. @@ -18,7 +18,7 @@ detailed_description: | "_" is a cursor position. and type "," +------------------------------------- | - | + | | | | @@ -35,12 +35,10 @@ detailed_description: | And type "," +------------------------------------- |
- |
- |
+ |
_
|
|
- |
- |
+ |
|
| _ +------------------------------------- @@ -63,10 +61,14 @@ detailed_description: | \ } \} + You can set language attribute in html using zen_settings['lang']. + install_details: | copy zencoding.vim to your plugin directory. versions: +- '0.4': | + This is an upgrade for ZenCoding.vim: fixed cursor position. fixed ${lang} replacement. - '0.3': | This is an upgrade for ZenCoding.vim: fixed line expanding. - '0.2': |