mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 02:20:03 +08:00
Support visual mode iedit
This commit is contained in:
parent
3d34132df6
commit
64e9ec317a
@ -51,18 +51,16 @@ function! SpaceVim#plugins#iedit#start(...)
|
|||||||
let s:mode = 'n'
|
let s:mode = 'n'
|
||||||
let w:spacevim_iedit_mode = s:mode
|
let w:spacevim_iedit_mode = s:mode
|
||||||
let w:spacevim_statusline_mode = 'in'
|
let w:spacevim_statusline_mode = 'in'
|
||||||
if get(a:000, 1, 0) == 1
|
if get(a:000, 0, 0) == 1
|
||||||
if a:firstline == a:lastline
|
let save_reg_k = @k
|
||||||
let save_reg_k = @k
|
normal! gv"ky
|
||||||
normal! gv"ky
|
let symbol = split(@k, "\n")[0]
|
||||||
let symbol = @k
|
let @k = save_reg_k
|
||||||
let @k = save_reg_k
|
|
||||||
else
|
|
||||||
let symbol = expand('<cword>')
|
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
let symbol = expand('<cword>')
|
let symbol = expand('<cword>')
|
||||||
endif
|
endif
|
||||||
|
echomsg string(a:000)
|
||||||
|
echom symbol
|
||||||
let begin = get(a:000, 1, 1)
|
let begin = get(a:000, 1, 1)
|
||||||
let end = get(a:000, 2, line('$'))
|
let end = get(a:000, 2, line('$'))
|
||||||
call s:parse_symbol(begin, end, symbol)
|
call s:parse_symbol(begin, end, symbol)
|
||||||
|
Loading…
Reference in New Issue
Block a user