I'm trying to code some projects in flutter by the dart language.
I want to count the time that spends in insert mode to finish this project
:call Startchrono()
0 : wait to go in insert mode ...
chrono++...
7 wait to go in insert mode ...
...
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.
Sign up to join this communityUse InsertEnter
and InsertLeave
autocommands to count it:
let g:time_total = 0
let g:time_step = 0
augroup counter | au!
au InsertEnter * let g:time_step = localtime()
au InsertLeave * let g:time_total += localtime() - g:time_step
augroup END
Here in g:time_total
there would be number of seconds you spent in insert mode.