abudden avatar abudden committed 7abf673

Documentation for projects option.

Comments (0)

Files changed (1)

doc/TagHighlight.txt

 		to separate them, or you can put one entry on each subsequeunt
 		line with a tab character at the start of the line.
 
+		An alternative method of setting project-specific options is to use
+		the |TagHL-Projects| option: see the documentation for this option for
+		more information.
+
 	Buffer Options                   *b:TagHighlightSettings*
 
 		Buffer specific options are set in a buffer-local |Dictionary| in
 		IgnoreFileScope                  Link:|TagHL-IgnoreFileScope|
 			Highlight everything everywhere, ignoring file-scope.
 
+	Project Configuration
+
+		Projects                         Link:|TagHL-Projects|
+			Project-specific configuration.
+
 	Customisation:
 
 		PreReadHooks                     Link:|TagHL-PreReadHooks|
 		Option Type: String
 		Default: "taghl_config.txt"
 
+	Projects                             *TagHL-Projects*
+		This is a special option that contains a nested dictionary.  It is
+		typically used through the of a |TagHLConfig.txt| file.  The option
+		allows you to specify that a directory (and all subdirectories of that
+		directory) holds a project.  In combination with the option to
+		automatically set the working directory (|TagHL-SetWorkingDir|), this
+		will ensure that Vim's current working directory is correct for your
+		projects.  More importantly, it allows project-specific configuration
+		to be specified outside of the project directory.
+
+		The dictionary should contain keys denoting project names and values
+		that are dictionaries of other options as appropriate, but the
+		|TagHL-SourceDir| option is mandatory.  If you only want to use
+		|TagHL-SetWorkingDir|, you can use a simpler form where the project
+		name is the key and the working directory is the value.  This is
+		probably better explained by an example, so here is a possible
+		|TagHLConfig.txt| file:
+>
+			# Global Options
+			EnableCscope:True
+			ReloadColourScheme:True
+			SetWorkingDir:True
+			# Project options
+			Projects:
+				# A simple project just using SetWorkingDir
+				DevProj1:/home/al/dev_project1
+				# A more complex project: set these options for
+				# this project
+				DevProj2:
+					SourceDir:/home/al/dev_proj_2
+					IncludeSynMatches:True
+<
+
+		Option Type: Dictionary
+		Default: {}
+
 	PythonVariantPriority                *TagHL-PythonVariantPriority*
 		The python part of |TagHighlight| can be run in a number of ways,
 		depending on your system configuration.  For most users, this should
 	
 	* Added cscope support - update cscope database at the same time as ctags
 	  one.  Also automatically manage cscope connections.
+	* Added project configuration feature (set options per project based on
+	  the location of those projects rather than local taghl_config.txt).
 	* Global configuration can now be set using a text file in the ~/.vim or
 	  vimfiles directory (|TagHLConfig.txt|).
 	* Added support for Javascript (thanks to Piotr Yordanov).
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.