function! InitScr() silent % delete _ let l:w = winwidth('%') let l:h = winheight('%') setlocal nonu setlocal guicursor=a:blinkon0 let l:spaceLine = repeat(' ', l:w - 1) for l in range(1, l:h+1) call setline(l,l:spaceLine) endfor endfunction function! Move(y, x) call setpos('.', [bufnr('%'), a:y, a:x, getpos('.')[3]]) endfunction function! Addch(ch) let l:pos = getpos('.') let l:lineArry = split(getline('.'),'\zs') let l:lineArry[col('.')] = a:ch call setline('.',join(l:lineArry, '')) let l:pos[2] += 1 call setpos('.', l:pos) endfunction function! Erase() silent % delete _ let l:w = winwidth('%') let l:h = winheight('%') let l:spaceLine = repeat(' ', l:w) for l in range(1, l:h+1) call setline(l,l:spaceLine) endfor endfunction
こんなコードをちょっと作成してみまして、これとsleep [N]mとを合わせてそれなりにアニメーションを作る事もできました。