aboutsummaryrefslogtreecommitdiff
path: root/.vim/bundle/vim-airline/autoload/airline/debug.vim
blob: 28424a6567405ce4af2f7bc2984d966794470d4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
" vim: et ts=2 sts=2 sw=2

function! airline#debug#profile1()
  profile start airline-profile-switch.log
  profile func *
  profile file *
  split
  for i in range(1, 1000)
    wincmd w
    redrawstatus
  endfor
  profile pause
  noautocmd qall!
endfunction

function! airline#debug#profile2()
  profile start airline-profile-cursor.log
  profile func *
  profile file *
  edit blank
  call setline(1, 'all your base are belong to us')
  call setline(2, 'all your base are belong to us')
  let positions = [[1,2], [2,2], [1,2], [1,1]]
  for i in range(1, 1000)
    for pos in positions
      call cursor(pos[0], pos[1])
      redrawstatus
    endfor
  endfor
  profile pause
  noautocmd qall!
endfunction

function! airline#debug#profile3()
  profile start airline-profile-mode.log
  profile func *
  profile file *

  for i in range(1000)
    startinsert
    redrawstatus
    stopinsert
    redrawstatus
  endfor

  profile pause
  noautocmd qall!
endfunction