mirror of
https://github.com/neovim/neovim.git
synced 2024-12-22 04:05:09 -07:00
32 lines
537 B
VimL
32 lines
537 B
VimL
|
" Tests for 'virtualedit'.
|
||
|
|
||
|
func Test_yank_move_change()
|
||
|
split
|
||
|
call setline(1, [
|
||
|
\ "func foo() error {",
|
||
|
\ "\tif n, err := bar();",
|
||
|
\ "\terr != nil {",
|
||
|
\ "\t\treturn err",
|
||
|
\ "\t}",
|
||
|
\ "\tn = n * n",
|
||
|
\ ])
|
||
|
set virtualedit=all
|
||
|
set ts=4
|
||
|
function! MoveSelectionDown(count) abort
|
||
|
normal! m`
|
||
|
silent! exe "'<,'>move'>+".a:count
|
||
|
norm! ``
|
||
|
endfunction
|
||
|
|
||
|
xmap ]e :<C-U>call MoveSelectionDown(v:count1)<CR>
|
||
|
2
|
||
|
normal 2gg
|
||
|
normal J
|
||
|
normal jVj
|
||
|
normal ]e
|
||
|
normal ce
|
||
|
bwipe!
|
||
|
set virtualedit=
|
||
|
set ts=8
|
||
|
endfunc
|