forked from luna/vim-rana-local
auto create log file if does not exist
This commit is contained in:
parent
7d71f33b4c
commit
7d41df4edb
1 changed files with 5 additions and 3 deletions
|
@ -55,6 +55,9 @@ endif
|
||||||
" We are not away until getting a CursorHold event
|
" We are not away until getting a CursorHold event
|
||||||
let s:away_start = 0
|
let s:away_start = 0
|
||||||
|
|
||||||
|
" Create logfile if does not exist
|
||||||
|
exec "silent !touch ~/.wakatime.log"
|
||||||
|
|
||||||
python << ENDPYTHON
|
python << ENDPYTHON
|
||||||
import vim
|
import vim
|
||||||
import uuid
|
import uuid
|
||||||
|
@ -83,6 +86,8 @@ function! s:setUpdateTime()
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
call s:setUpdateTime()
|
||||||
|
|
||||||
function! s:GetCurrentFile()
|
function! s:GetCurrentFile()
|
||||||
return expand("%:p")
|
return expand("%:p")
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -200,9 +205,6 @@ endfunction
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
|
|
||||||
call s:setUpdateTime()
|
|
||||||
|
|
||||||
|
|
||||||
" Autocommand Events {{{
|
" Autocommand Events {{{
|
||||||
|
|
||||||
augroup Wakatime
|
augroup Wakatime
|
||||||
|
|
Loading…
Reference in a new issue