Commits

abudden committed b66025c

Moved private data into separate variable (fixes #21).

Comments (0)

Files changed (3)

autoload/TagHighlight/LoadDataFile.vim

 let g:loaded_TagHLLoadDataFile = 1
 
 function! TagHighlight#LoadDataFile#LoadDataFile(filename)
-	let filename = g:TagHighlightSettings['PluginPath'] . '/data/' . a:filename
+	let filename = g:TagHighlightPrivate['PluginPath'] . '/data/' . a:filename
 	return TagHighlight#LoadDataFile#LoadFile(filename)
 endfunction
 

autoload/TagHighlight/ReadTypes.vim

 function! TagHighlight#ReadTypes#ReadTypesAutoDetect()
 	let extension = expand('%:e')
 	" echomsg "Reading types for extension " . extension
-	for key in keys(g:TagHighlightSettings['ExtensionLookup'])
+	for key in keys(g:TagHighlightPrivate['ExtensionLookup'])
 		let regex = '^'.key.'$'
 		if extension =~ regex
-			call TagHighlight#ReadTypes#ReadTypes(g:TagHighlightSettings['ExtensionLookup'][key])
+			call TagHighlight#ReadTypes#ReadTypes(g:TagHighlightPrivate['ExtensionLookup'][key])
 		endif
 	endfor
 endfunction
 	call TagHighlight#Debug#Print("Searching for types file", 'Status')
 
 	" Clear any existing syntax entries
-	for group in g:TagHighlightSettings['AllTypes']
+	for group in g:TagHighlightPrivate['AllTypes']
 		exe 'syn clear' group
 	endfor
 	

autoload/TagHighlight/RunPythonScript.vim

 	echomsg "Using variant: " .s:python_variant
 
 	if index(["if_pyth","if_pyth3"], s:python_variant) != -1
-		let add_to_py_path = substitute(g:TagHighlightSettings['PluginPath'], '\\', '/','g')
+		let add_to_py_path = substitute(g:TagHighlightPrivate['PluginPath'], '\\', '/','g')
 		let PY = s:python_cmd[0]
 		exe PY 'import sys'
 		exe PY 'sys.path = ["'.add_to_py_path.'"] + sys.path'
 		exe PY 'options = TagHighlightOptionDict()'
 		let handled_options = []
 		" We're using the custom interpreter: create an options object
-		for option in g:TagHighlightSettings['ScriptOptions']
+		for option in g:TagHighlightPrivate['ScriptOptions']
 			if has_key(option, 'VimOptionMap') && has_key(a:options, option['VimOptionMap'])
 				" We can handle this one automatically
 				let pyoption = 'options["'.option['Destination'].'"]'
 	elseif index(["python","compiled"], s:python_variant) != -1
 		let args = s:python_cmd[:]
 		" We're calling the script externally, build a list of arguments
-		for option in g:TagHighlightSettings['ScriptOptions']
+		for option in g:TagHighlightPrivate['ScriptOptions']
 			if has_key(option, 'VimOptionMap') && has_key(a:options, option['VimOptionMap'])
 				if type(option['CommandLineSwitches']) == type([])
 					let switch = option['CommandLineSwitches'][0]
 endfunction
 
 function! TagHighlight#RunPythonScript#LoadScriptOptions()
-	if has_key(g:TagHighlightSettings, 'ScriptOptions')
+	if has_key(g:TagHighlightPrivate, 'ScriptOptions')
 		return
 	endif
 
-	let g:TagHighlightSettings['ScriptOptions'] = []
+	let g:TagHighlightPrivate['ScriptOptions'] = []
 	let options = TagHighlight#LoadDataFile#LoadDataFile('options.txt')
 
 	for option_dest in keys(options)
 		let option = deepcopy(options[option_dest])
 		let option['Destination'] = option_dest
-		let g:TagHighlightSettings['ScriptOptions'] += [option]
+		let g:TagHighlightPrivate['ScriptOptions'] += [option]
 	endfor
 endfunction
 
 					" We've found python, it's probably usable
 					let s:python_variant = 'python'
 					let s:python_path = python_path
-					let s:python_cmd = [python_path, g:TagHighlightSettings['PluginPath'] . '/TagHighlight.py']
+					let s:python_cmd = [python_path, g:TagHighlightPrivate['PluginPath'] . '/TagHighlight.py']
 				else
 					" See if it's in the path
 					let python_path = TagHighlight#RunPythonScript#FindExeInPath('python')
 					if python_path != 'None'
 						let s:python_variant = 'python'
 						let s:python_path = python_path
-						let s:python_cmd = [python_path, g:TagHighlightSettings['PluginPath'] . '/TagHighlight.py']
+						let s:python_cmd = [python_path, g:TagHighlightPrivate['PluginPath'] . '/TagHighlight.py']
 					endif
 				endif
 			elseif variant == 'compiled'
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.