diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 42d10cb..483d9d6 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -81,8 +81,6 @@ let s:delayed_update_files = [] let g:loaded_tagbar = 1 let s:last_highlight_tline = 0 -let s:debug = 0 -let s:debug_file = '' let s:warnings = { \ 'type': [], @@ -114,7 +112,7 @@ endfunction " s:InitTypes() {{{2 function! s:InitTypes() abort - call s:debug('Initializing types') + call tagbar#debug#log('Initializing types') let supported_types = s:GetSupportedFiletypes() @@ -127,7 +125,7 @@ function! s:InitTypes() abort " Use jsctags/doctorjs if available let jsctags = s:CheckFTCtags('jsctags', 'javascript') if jsctags != '' - call s:debug('Detected jsctags, overriding typedef') + call tagbar#debug#log('Detected jsctags, overriding typedef') let type_javascript = tagbar#prototypes#typeinfo#new() let type_javascript.ctagstype = 'javascript' let type_javascript.kinds = [ @@ -174,12 +172,12 @@ function! s:LoadUserTypeDefs(...) abort if a:0 > 0 let type = a:1 - call s:debug("Initializing user type '" . type . "'") + call tagbar#debug#log("Initializing user type '" . type . "'") let defdict = {} let defdict[type] = g:tagbar_type_{type} else - call s:debug('Initializing user types') + call tagbar#debug#log('Initializing user types') let defdict = tagbar#getusertypes() endif @@ -238,11 +236,11 @@ endfunction " Properly restore Tagbar after a session got loaded function! s:RestoreSession() abort if s:init_done - call s:debug('Tagbar already initialized; not restoring session') + call tagbar#debug#log('Tagbar already initialized; not restoring session') return endif - call s:debug('Restoring session') + call tagbar#debug#log('Restoring session') let curfile = fnamemodify(bufname('%'), ':p') @@ -273,7 +271,7 @@ endfunction " s:MapKeys() {{{2 function! s:MapKeys() abort - call s:debug('Mapping keys') + call tagbar#debug#log('Mapping keys') nnoremap