Skip to content

Commit

Permalink
add commands to toggle debug mode within Vim
Browse files Browse the repository at this point in the history
  • Loading branch information
alanhamlett committed Apr 21, 2017
1 parent 84e81cb commit eb862c8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions plugin/wakatime.vim
Expand Up @@ -280,6 +280,16 @@ let s:VERSION = '4.0.15'
return s:false
endfunction

function! s:EnableDebugMode()
call s:SetIniSetting('settings', 'debug', 'true')
let s:is_debug_mode_on = s:true
endfunction

function! s:DisableDebugMode()
call s:SetIniSetting('settings', 'debug', 'false')
let s:is_debug_mode_on = s:false
endfunction

" }}}


Expand Down Expand Up @@ -318,5 +328,13 @@ let s:VERSION = '4.0.15'
" }}}


" Plugin Commands {{{

:command -nargs=0 WakaTimeDebugEnable call s:EnableDebugMode()
:command -nargs=0 WakaTimeDebugDisable call s:DisableDebugMode()

" }}}


" Restore cpoptions
let &cpo = s:old_cpo

0 comments on commit eb862c8

Please sign in to comment.