1. abudden
  2. TagHighlight


abudden  committed 360387a

Added debug command that clears the file.

  • Participants
  • Parent commits 43607e0
  • Branches default

Comments (0)

Files changed (3)

File autoload/TagHighlight/Debug.vim

View file
  • Ignore whitespace
-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'
 		let debug_file = a:filename
+		if a:reset
+			call delete(a:filename)
+		endif
 	let debug_options = ["DebugFile","DebugLevel"]

File doc/TagHighlight.txt

View file
  • Ignore whitespace
 	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.

File plugin/TagHighlight.vim

View file
  • Ignore whitespace
 " 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()