add commands to toggle debug mode within Vim

This commit is contained in:
Alan Hamlett 2017-04-20 19:14:54 -07:00
parent 84e81cb596
commit eb862c880a

View file

@ -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
" }}}
@ -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