1. abudden
  2. TagHighlight


abudden  committed 8f14dee

Added more links in installation guide and added documentation on standard libraries (#19).

  • Participants
  • Parent commits 0d117e8
  • Branches default

Comments (0)

Files changed (1)

File doc/TagHighlight.txt

View file
  • Ignore whitespace
 	2.4.3 Option Details                     |TagHighlight-option-details|
 	2.5   Installation                       |TagHighlight-install|
 	2.5.1 Requirements                       |TagHighlight-requirements|
+	2.5.2 Installation Guide                 |TagHighlight-install-guide|
 	3.    Standard Libraries                 |TagHighlight-standard-libraries|
+	3.1   Introduction                       |TagHighlight-stdlib-intro|
+	3.2   Adding More Standard Libraries     |TagHighlight-adding-libraries|
 	4.    TagHighlight Customisation         |TagHighlight-custom|
 	4.1   Adding More Languages              |TagHighlight-adding|
 2.2 Commands                             *TagHighlight-commands*            {{{2
 	The following commands are provided by this plugin:
 		built-in autocmds should load the types files when a file is
 		loaded or the types files are updated.
 2.3 Colouring                            *TagHighlight-colours*             {{{2
 	The tag highlighter uses a number of additional highlighting groups to
 	However, this probably defies the point of having the tag highlighter in
 	the first place!
 2.4 Configuration                        *TagHighlight-config*              {{{2
 	There are a large number of configuration options that allow customisation
 		Option Type: String
 2.5 Installation                         *TagHighlight-install*             {{{2
 2.5.2 Installation Guide                 *TagHighlight-install-guide*       {{{3
-	Uninstalling ctags_highlighter:
+	Uninstalling ctags_highlighter:      *TagHighlight-remove-old*          {{{4
 		This plugin replaces the previous version, which was called
 		ctags_highlighter.  Please delete ctags_highlighter before using this
 		* types_android.vim (if you installed the GUI types addon)
 		* types_jdk.vim (if you installed the GUI types addon)
-	Installing the main plugin:
+	Installing the main plugin:          *TagHighlight-install-main*        {{{4
 		The TagHighlight plugin is distributed as a zip file.  If you are
 		using the pathogen plugin, create a directory called TagHighlight in
 		the new directory.  If you are not using the pathogen plugin, simply
 		unzip the zip file directly into your ~/.vim or vimfiles directory.
-	Updating the help tags:
+	Updating the help tags:              *TagHighlight-update-helptags*     {{{4
 		If you use pathogen, run:
 		as appropriate.
-	Installing the compiled version of the python code:
+	Installing the compiled version:     *TagHighlight-install-compiled*    {{{4
 		If you want to use the compiled version of the plugin (if you do not
 		have python on your system), download the zip file for your chosen
 		location as the main plugin (~/.vim or ~/.vim/bundle/TagHighlight
 		depending on whether you use pathogen).
-	Installing the standard libraries:
+	Installing the standard libraries:   *TagHighlight-install-stdlib*      {{{4
 		If you want support for highlighting of standard libraries (see
 		|TagHighlight-standard-libraries|), unzip that zip file in the same
 		place as the main plugin (~/.vim or ~/.vim/bundle/TagHighlight
 		depending on whether you use pathogen).
-	Uninstalling:
+	Uninstalling:                        *TagHighlight-uninstall*           {{{4
 		If you use pathogen and have followed the pathogen install
 		instructions above, you should be able to simply delete
 3. Standard Libraries                    *TagHighlight-standard-libraries*  {{{1
-	... TODO
+3.1 Introduction                         *TagHighlight-stdlib-intro*        {{{2
+	|TagHighlight| supports two different methods for loading in tag definitions
+	for highlighting of tags that are defined outside of the main source code.
+	For libraries that are specific to your project and not likely to be used
+	widely, User Libraries can be defined.  For these, types highlighter files
+	are generated for the library and then the project configuration links
+	directly to those library files.  For more information on user libraries,
+	see |TagHL-UserLibraries|.
+	For libraries that are common across a lot of projects (and probably a lot
+	of people), standard libraries can be defined.  A number of these standard
+	libraries are available on the |TagHighlight-website|.  For installation
+	instructions, see |TagHighlight-install-stdlib|.  At the time of writing,
+	the available standard libraries are:
+	* "Android SDK": Android Software Development Kit (Java)
+	* "JDK": Java Development Kit (Java)
+	* "PySide": PySide framework (Python; limited support)
+	* "Qt4": Qt4 (C++)
+	* "wxpython": wxPython (Python; limited support)
+	* "wxWidgets": wxWidgets (C++)
+	If a source file is opened that looks like it might be part of one of
+	these libraries, the standard library highlighter is automatically loaded.
+	Forcing loading of a particular library can be achieved using the option
+	|TagHL-ForcedStandardLibraries| (the library names are the bits in double
+	quotes in the list above).  Disabling standard library parsing can be
+	achieved either by deleting the standard libraries (or not installing them
+	in the first place), or by setting |TagHL-DisableStandardLibraries| to
+	True or 1.
+3.2 Adding More Standard Libraries       *TagHighlight-adding-libraries*    {{{2
+	Standard libraries are stored in the standard_libraries subdirectory of
+	the main plugin area (plugin/TagHighlight).  Each standard library is held
+	in its own subdirectory (the name is not important).  In that directory
+	there should be a types highlighter file generated from the standard
+	library: again the name is not important, but it shouldn't end with .vim
+	as otherwise it will be automatically sourced by Vim on startup!).  As an
+	example, the Android SDK highlighter file is called android_sdk.taghl.  In
+	addition, there should be a file called library_types.txt giving the
+	details of that library.
+	The format of library_types.txt is similar to that of the project
+	configuration file (see |taghl_config.txt|) and all txt files used by
+	TagHighlight.  The required fields are as follows:
+		LibraryName - The "friendly" name of the library, e.g. Android SDK
+		TypesFiles - A comma-separated list of types highlighter files to load
+		             (usually only one).
+		TypesSuffixes - Language suffixes to which this highlighter applies.
+		CheckMode - One of the following methods for determining if a source
+		            file should load this standard library:
+			* Always - This standard library will be loaded for all files of
+			           the correct language (where TypesSuffixes matches).
+			* MatchStart - Search for any one of a set of regular expressions
+			               (set with MatchREs) in the first MatchLines lines
+			               (default 30) in the file.
+			* MatchEnd - Like MatchStart, but look in the last MatchLines lines
+			               in the file.
+			* Custom - Call a custom function (name provided in
+			           CustomFunction) with the suffix as a parameter.  If it
+			           returns 'Load', load the library; if it returns 'Skip',
+			           do not load the library.  Any other return value is an
+			           error.
+	Other options that may be required depending on the CheckMode:
+		MatchREs - list of Vim regular expressions to compare against the
+		           first (if using MatchStart) or last (if using MatchEnd)
+		           MatchLines lines in the file.  Required for MatchStart or
+		           MatchEnd.
+		MatchLines - If using MatchStart or MatchEnd, the number of lines to
+		             scan when trying to match the regular expressions.  If
+		             not provided, defaults to 30.
+		CustomFunction - The name of the function used in the Custom
+		                 CheckMode.  Required if using Custom.
+	See the existing standard libraries for examples.
 4. TagHighlight Customisation            *TagHighlight-custom*              {{{1