From 32d266a4301499639725fa0c8e76206e43c49cfb Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Mon, 12 Dec 2011 19:47:43 +1300 Subject: [PATCH] Add debugging functionality --- autoload/tagbar.vim | 110 +++++++++++++++++++++++++++++++++++++++++++- doc/tagbar.txt | 14 ++++++ plugin/tagbar.vim | 2 + 3 files changed, 125 insertions(+), 1 deletion(-) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 3f37085..50f1b04 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -99,9 +99,13 @@ let s:access_symbols = { let g:loaded_tagbar = 1 let s:last_highlight_tline = 0 +let s:debug = 0 +let s:debug_file = '' " s:InitTypes() {{{2 function! s:InitTypes() + call s:LogDebugMessage('Initializing types') + let s:known_types = {} " Ant {{{3 @@ -748,6 +752,8 @@ endfunction " s:GetUserTypeDefs() {{{2 function! s:GetUserTypeDefs() + call s:LogDebugMessage('Initializing user types') + redir => defs silent execute 'let g:' redir END @@ -798,6 +804,8 @@ endfunction " s:RestoreSession() {{{2 " Properly restore Tagbar after a session got loaded function! s:RestoreSession() + call s:LogDebugMessage('Restoring session') + let tagbarwinnr = bufwinnr('__Tagbar__') if tagbarwinnr == -1 " Tagbar wasn't open in the saved session, nothing to do @@ -833,6 +841,8 @@ endfunction " s:MapKeys() {{{2 function! s:MapKeys() + call s:LogDebugMessage('Mapping keys') + nnoremap