2015/09/04

Vimのウィンドウが勝手にびよんびよんなってたのしいやつができたぞ!!!

let s:i = 0
let s:s = 10

functions:byonbyon()
  let &columns = s:w + float2nr(cos(3.141592*(0.0 + s:i * s:s)/180.0) * 10)
  let &lines = s:h + float2nr(sin(3.141592*(0.0 + s:i * s:s)/180.0) * 5)
  let s:i += 1
  call feedkeys(mode() ==# "i" ? "\<C-g>\<ESC>" : "g\<ESC>""n")
endfunction

functions:stop_byonbyon()
  augroup ByonByon
    autocmd!
  augroup END
endfunction

functions:start_byonbyon()
  let s:w = &columns
  let s:h = &lines
  set lazyredraw updatetime=10
  augroup ByonByon
    autocmd!
    autocmd CursorHold,CursorHoldI * call s:byonbyon()
  augroup END
  commandStopByonByon call <SID>stop_byonbyon()
endfunction

commandStartByonByon call <SID>start_byonbyon()

:StartByonByon を実行するとびよんびよんなってたのしい。まったく仕事できない。止めるには:StopByonByonを実行する。

びょんびょん

参考資料: Emacsのウィンドウが勝手にびよんびよんなってたのしいやつ - hitode909の日記



/ (1970年01月01日)
 
発送可能時間:

Posted at 19:35 | WriteBacks () | Edit
Edit this entry...

wikieditish message: Ready to edit this entry.






















A quick preview will be rendered here when you click "Preview" button.