mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-10 04:21:51 +08:00
fixed character wise selection.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
"=============================================================================
|
"=============================================================================
|
||||||
" zencoding.vim
|
" zencoding.vim
|
||||||
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
||||||
" Last Change: 06-May-2012.
|
" Last Change: 07-May-2012.
|
||||||
|
|
||||||
let s:save_cpo = &cpo
|
let s:save_cpo = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
@@ -805,10 +805,12 @@ function! zencoding#expandAbbr(mode) range
|
|||||||
endif
|
endif
|
||||||
let expand = substitute(expand, '\${cursor}', '$cursor$', '')
|
let expand = substitute(expand, '\${cursor}', '$cursor$', '')
|
||||||
let expand = substitute(expand, '\${cursor}', '', 'g')
|
let expand = substitute(expand, '\${cursor}', '', 'g')
|
||||||
silent! normal! gvc
|
silent! normal! gv
|
||||||
|
let col = col("'<")
|
||||||
|
silent! normal! c
|
||||||
let line = getline('.')
|
let line = getline('.')
|
||||||
let lhs = matchstr(line, '.*\%'.col('.').'c.')
|
let lhs = matchstr(line, '.*\%'.(col-1).'c.')
|
||||||
let rhs = matchstr(line, '\%>'.col('.').'c.*')
|
let rhs = matchstr(line, '\%>'.(col-1).'c.*')
|
||||||
let expand = lhs.expand.rhs
|
let expand = lhs.expand.rhs
|
||||||
let lines = split(expand, '\n')
|
let lines = split(expand, '\n')
|
||||||
call setline(line('.'), lines[0])
|
call setline(line('.'), lines[0])
|
||||||
|
|||||||
Reference in New Issue
Block a user