1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 22:20:06 +08:00

Support visual mode iedit

This commit is contained in:
wsdjeg 2018-01-12 22:50:38 +08:00
parent 3d34132df6
commit 64e9ec317a

View File

@ -51,18 +51,16 @@ function! SpaceVim#plugins#iedit#start(...)
let s:mode = 'n'
let w:spacevim_iedit_mode = s:mode
let w:spacevim_statusline_mode = 'in'
if get(a:000, 1, 0) == 1
if a:firstline == a:lastline
let save_reg_k = @k
normal! gv"ky
let symbol = @k
let @k = save_reg_k
else
let symbol = expand('<cword>')
endif
if get(a:000, 0, 0) == 1
let save_reg_k = @k
normal! gv"ky
let symbol = split(@k, "\n")[0]
let @k = save_reg_k
else
let symbol = expand('<cword>')
endif
echomsg string(a:000)
echom symbol
let begin = get(a:000, 1, 1)
let end = get(a:000, 2, line('$'))
call s:parse_symbol(begin, end, symbol)