forked from VimPlug/emmet-vim
fixed problem breaking multibyte when cursor is in a part of line.
This commit is contained in:
2
docs
2
docs
Submodule docs updated: 9c62c07f1a...01d436b51f
@@ -1,7 +1,7 @@
|
|||||||
"=============================================================================
|
"=============================================================================
|
||||||
" File: zencoding.vim
|
" File: zencoding.vim
|
||||||
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
||||||
" Last Change: 12-Mar-2010.
|
" Last Change: 14-Mar-2010.
|
||||||
" Version: 0.32
|
" Version: 0.32
|
||||||
" WebPage: http://github.com/mattn/zencoding-vim
|
" WebPage: http://github.com/mattn/zencoding-vim
|
||||||
" Description: vim plugins for HTML and CSS hi-speed coding.
|
" Description: vim plugins for HTML and CSS hi-speed coding.
|
||||||
@@ -83,7 +83,7 @@ for item in [
|
|||||||
\ {'mode': 'i', 'var': 'user_zen_expandabbr_key', 'key': ',', 'plug': 'ZenCodingExpandAbbr', 'func': '<c-g>u<esc>:call <sid>zen_expandAbbr(0)<cr>a'},
|
\ {'mode': 'i', 'var': 'user_zen_expandabbr_key', 'key': ',', 'plug': 'ZenCodingExpandAbbr', 'func': '<c-g>u<esc>:call <sid>zen_expandAbbr(0)<cr>a'},
|
||||||
\ {'mode': 'i', 'var': 'user_zen_expandword_key', 'key': '.', 'plug': 'ZenCodingExpandWord', 'func': '<c-g>u<esc>:call <sid>zen_expandAbbr(1)<cr>a'},
|
\ {'mode': 'i', 'var': 'user_zen_expandword_key', 'key': '.', 'plug': 'ZenCodingExpandWord', 'func': '<c-g>u<esc>:call <sid>zen_expandAbbr(1)<cr>a'},
|
||||||
\ {'mode': 'v', 'var': 'user_zen_expandabbr_key', 'key': ',', 'plug': 'ZenCodingExpandVisual', 'func': ':call <sid>zen_expandAbbr(2)<cr>'},
|
\ {'mode': 'v', 'var': 'user_zen_expandabbr_key', 'key': ',', 'plug': 'ZenCodingExpandVisual', 'func': ':call <sid>zen_expandAbbr(2)<cr>'},
|
||||||
\ {'mode': 'n', 'var': 'user_zen_expandabbr_key', 'key': ',', 'plug': 'ZenCodingExpandNormal', 'func': ':call <sid>zen_expandAbbr(0)<cr>'},
|
\ {'mode': 'n', 'var': 'user_zen_expandabbr_key', 'key': ',', 'plug': 'ZenCodingExpandNormal', 'func': ':call <sid>zen_expandAbbr(3)<cr>'},
|
||||||
\ {'mode': 'i', 'var': 'user_zen_balancetaginward_key', 'key': 'd', 'plug': 'ZenCodingBalanceTagInward', 'func': '<esc>:call <sid>zen_balanceTag(0)<cr>a'},
|
\ {'mode': 'i', 'var': 'user_zen_balancetaginward_key', 'key': 'd', 'plug': 'ZenCodingBalanceTagInward', 'func': '<esc>:call <sid>zen_balanceTag(0)<cr>a'},
|
||||||
\ {'mode': 'n', 'var': 'user_zen_balancetaginward_key', 'key': 'd', 'plug': 'ZenCodingBalanceTagInward', 'func': ':call <sid>zen_balanceTag(0)<cr>'},
|
\ {'mode': 'n', 'var': 'user_zen_balancetaginward_key', 'key': 'd', 'plug': 'ZenCodingBalanceTagInward', 'func': ':call <sid>zen_balanceTag(0)<cr>'},
|
||||||
\ {'mode': 'i', 'var': 'user_zen_balancetagoutward_key', 'key': 'D', 'plug': 'ZenCodingBalanceTagOutward', 'func': '<esc>:call <sid>zen_balanceTag(1)<cr>a'},
|
\ {'mode': 'i', 'var': 'user_zen_balancetagoutward_key', 'key': 'D', 'plug': 'ZenCodingBalanceTagOutward', 'func': '<esc>:call <sid>zen_balanceTag(1)<cr>a'},
|
||||||
@@ -1298,13 +1298,16 @@ function! s:zen_expandAbbr(mode) range
|
|||||||
endif
|
endif
|
||||||
silent! exe "normal! gvc"
|
silent! exe "normal! gvc"
|
||||||
else
|
else
|
||||||
let line = getline('.')[:col('.')]
|
let line = getline('.')
|
||||||
|
if col('.') < len(line)
|
||||||
|
let line = matchstr(line, '^\(.*\%'.col('.').'v.\)')
|
||||||
|
endif
|
||||||
if a:mode == 1 || type != 'html'
|
if a:mode == 1 || type != 'html'
|
||||||
let part = matchstr(line, '\([a-zA-Z0-9_\@:|]\+\)$')
|
let part = matchstr(line, '\([a-zA-Z0-9_\@:|]\+\)$')
|
||||||
else
|
else
|
||||||
let part = matchstr(line, '\(\S.*\)$')
|
let part = matchstr(line, '\(\S.*\)$')
|
||||||
endif
|
endif
|
||||||
let rest = getline('.')[col('.')+1:]
|
let rest = getline('.')[len(line):]
|
||||||
let str = part
|
let str = part
|
||||||
let mx = '|\(html\|haml\|e\|c\|fc\|xsl\)\s*$'
|
let mx = '|\(html\|haml\|e\|c\|fc\|xsl\)\s*$'
|
||||||
if str =~ mx
|
if str =~ mx
|
||||||
|
|||||||
Reference in New Issue
Block a user