Commits

abudden committed 360387a

Added debug command that clears the file.

Comments (0)

Files changed (3)

autoload/TagHighlight/Debug.vim

 	endif
 endfunction
 
-function! TagHighlight#Debug#DebugUpdateTypesFile(filename)
+function! TagHighlight#Debug#DebugUpdateTypesFile(reset, filename)
 	" Update the types file with debugging turned on
 	if a:filename ==? 'None'
 		" Force case to be correct
 		let debug_file = 'None'
 	else
 		let debug_file = a:filename
+		if a:reset
+			call delete(a:filename)
+		endif
 	endif
 
 	let debug_options = ["DebugFile","DebugLevel"]

doc/TagHighlight.txt

 <
 	This will generate tags (recursively), create a types highlighter file and
 	try to read the relevant types highlighter files for all open files.  All
-	debugging information will be written to /path/to/debug_log.txt.
-
+	debugging information will be appended to /path/to/debug_log.txt.  To
+	clear the file prior to starting the log, use
+>
+		:UpdateTypesFileDebug! /path/to/debug_log.txt
+<
 	If you're having difficulties getting TagHighlight to work, please try
 	running the above command and send a brief description of the symptoms
 	along with a copy of the debug log to me at abudden _AT_ gmail _DOT_ com.

plugin/TagHighlight.vim

 endif
 
 " Update types & tags
-command! -bar UpdateTypesFile 
+command! -bar UpdateTypesFile
 			\ silent call TagHighlight#Generation#UpdateAndRead(0)
 
-command! -bar UpdateTypesFileOnly 
+command! -bar UpdateTypesFileOnly
 			\ silent call TagHighlight#Generation#UpdateAndRead(1)
 
-command! -nargs=1 UpdateTypesFileDebug 
-			\ call TagHighlight#Debug#DebugUpdateTypesFile(<f-args>)
+command! -nargs=1 -bang UpdateTypesFileDebug
+			\ call TagHighlight#Debug#DebugUpdateTypesFile(<bang>0, <f-args>)
 
 
 function! s:LoadLanguages()