Commits

abudden committed 54ed553

Fixed bug in java handler and added description of how to add languages from modified versions of ctags.

Comments (0)

Files changed (2)

autoload/TagHighlight/SpecialHandlers.vim

 " Tag Highlighter:
 "   Author:  A. S. Budden <abudden _at_ gmail _dot_ com>
-"   Date:    25/07/2011
+"   Date:    28/07/2011
 " Copyright: Copyright (C) 2009-2011 A. S. Budden
 "            Permission is hereby granted to use and distribute this code,
 "            with or without modifications, provided that this copyright
 endfunction
 
 function! TagHighlight#SpecialHandlers#JavaTopHandler()
-	if has_key(g:TagHighlightPrivate['Kinds']['java']
+	if has_key(g:TagHighlightPrivate['Kinds'], 'java')
 		exe 'syn cluster javaTop add=' . join(values(g:TagHighlightPrivate['Kinds']['java']), ',')
 	endif
 endfunction

doc/TagHighlight.txt

 
 	1. Run ctags --list-languages and check that the required language is
 	   present.
+	   
+	2. If you're using a custom version of ctags highlighter with extra
+	   languages, you may need to add the details to the kind list in
+	   plugin/TagHighlight/data/kinds.txt (for most standard languages, this
+	   won't be necessary).  To do this, run:
+>
+			ctags --list-kinds=all
+<
+	   and examine the entries for your language.
 
-	2. Create a new file in plugin/TagHighlight/data/languages/ with a .txt
+	3. Create a new file in plugin/TagHighlight/data/languages/ with a .txt
 	   extension (the file name can be anything you want).  Set the fileformat
 	   to be 'unix' for consistency and don't expand tabs in case you need to
 	   add any multi-line lists:
 >
-		set ff=unix noet
+			set ff=unix noet
 <
-	3. In that file, add the following fields in Key:Value format (one per
+	4. In that file, add the following fields in Key:Value format (one per
 	   line):
 
 		FriendlyName - Whatever you prefer to call the language.
 			 e.g. for C code, the suffix is c and the generated files
 			 are by default called types_c.taghl.
 
-	4. Optionally, add other fields as required:
+	5. Optionally, add other fields as required:
 
 		SkipList - Any specific ctags "kinds" (single characters referring
 			       to types of tags) that you want to omit from the types
 					that you are defining, it can be changed in the new
 					language definition.  Generally not really required.
 
-	5. Add a modeline for consistency:
+	6. Add a modeline for consistency:
 >
-	# vim: ff=unix:noet
+		# vim: ff=unix:noet
 <
-	5. Test your new language!
+	7. Test your new language!
 
-	6. Send me a copy for inclusion in the main distribution.
+	8. Send me a copy for inclusion in the main distribution.
 
 4.1.1 Example                            *TagHighlight-add-example*         {{{3
 
 ==============================================================================
 7. TagHighlight History                *TagHighlight-history*               {{{1
 
+2.0.5: 28th July 2011      : Bug fix in Java special handler.  Added
+                             description of how to add languages not supported
+                             by standard ctags.
+
 2.0.4: 27th July 2011      : Fixed bug in python interface (old variable
                              name); renamed ctags interface python code to
                              avoid potential issues with other plugins
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.