Commits

abudden committed 5ba42e8

Consolidation of option names so they're the same in Vim and Python.

Comments (0)

Files changed (9)

autoload/TagHighlight/Option.vim

 	let options = TagHighlight#LoadDataFile#LoadDataFile('options.txt')
 
 	for option_dest in keys(options)
-		if has_key(options[option_dest], 'VimOptionMap')
+		if has_key(options[option_dest], 'PythonOnly')
+			if (options[option_dest]['PythonOnly'] == 'True') || (options[option_dest]['PythonOnly'] == 1)
+				" Skip this one
+				continue
+			endif
+		else
 			let option = deepcopy(options[option_dest])
 			let option['Destination'] = option_dest
 			let g:TagHighlightPrivate['PluginOptions'] += [option]
-			let g:TagHighlightPrivate['FullOptionList'] += [option['VimOptionMap']]
+			let g:TagHighlightPrivate['FullOptionList'] += [option_dest]
 		endif
 	endfor
 

autoload/TagHighlight/RunPythonScript.vim

 		let handled_options = []
 		" We're using the custom interpreter: create an options object
 		" All options supported by both Vim and the Python script must
-		" have VimOptionMap and CommandLineSwitches keys
+		" have CommandLineSwitches key and not have PythonOnly set to True
 		for option in g:TagHighlightPrivate['PluginOptions']
-			if has_key(option, 'VimOptionMap') && 
-						\ has_key(option, 'CommandLineSwitches') &&
-						\ has_key(a:options, option['VimOptionMap'])
+			if has_key(option, 'CommandLineSwitches') &&
+						\ has_key(a:options, option['Destination'])
 				" We can handle this one automatically
 				let pyoption = 'options["'.option['Destination'].'"]'
 				if option['Type'] == 'bool'
-					let handled_options += [option['VimOptionMap']]
-					let value = a:options[option['VimOptionMap']]
+					let handled_options += [option['Destination']]
+					let value = a:options[option['Destination']]
 					if (value == 1) || (value == 'True')
 						exe PY pyoption '= True'
 					else
 						exe PY pyoption '= False'
 					endif
 				elseif option['Type'] == 'string'
-					let handled_options += [option['VimOptionMap']]
-					exe PY pyoption '= r"""'.a:options[option['VimOptionMap']].'"""'
+					let handled_options += [option['Destination']]
+					exe PY pyoption '= r"""'.a:options[option['Destination']].'"""'
 				elseif option['Type'] == 'int'
-					let handled_options += [option['VimOptionMap']]
-					exe PY pyoption '= ' . a:options[option['VimOptionMap']]
+					let handled_options += [option['Destination']]
+					exe PY pyoption '= ' . a:options[option['Destination']]
 				elseif option['Type'] == 'list'
-					let handled_options += [option['VimOptionMap']]
+					let handled_options += [option['Destination']]
 					exe PY pyoption '= []'
-					for entry in a:options[option['VimOptionMap']]
+					for entry in a:options[option['Destination']]
 						exe PY pyoption '+= [r"""' . entry . '"""]'
 					endfor
 				endif
 		let args = s:python_cmd[:]
 		" We're calling the script externally, build a list of arguments
 		for option in g:TagHighlightPrivate['PluginOptions']
-			if has_key(option, 'VimOptionMap') && 
-						\ has_key(option, 'CommandLineSwitches') &&
-						\ has_key(a:options, option['VimOptionMap'])
+			if has_key(option, 'CommandLineSwitches') &&
+						\ has_key(a:options, option['Destination'])
 				if type(option['CommandLineSwitches']) == type([])
 					let switch = option['CommandLineSwitches'][0]
 				else
 				elseif switch[:0] == "-"
 					let as_one = 0
 				else
-					call TagHLDebug("Invalid configuration for option " . option['VimOptionMap'], "Error")
+					call TagHLDebug("Invalid configuration for option " . option['Destination'], "Error")
 				endif
 				" We can handle this one automatically
 				if option['Type'] == 'bool'
-					if (a:options[option['VimOptionMap']] == 1) || (a:options[option['VimOptionMap']] == 'True')
+					if (a:options[option['Destination']] == 1) || (a:options[option['Destination']] == 'True')
 						let bvalue = 1
 					else
 						let bvalue = 0
 					endif
 				elseif option['Type'] == 'string'
 					if as_one == 1
-						let args += [switch . '=' . a:options[option['VimOptionMap']]]
+						let args += [switch . '=' . a:options[option['Destination']]]
 					else
-						let args += [switch, a:options[option['VimOptionMap']]]
+						let args += [switch, a:options[option['Destination']]]
 					endif
 				elseif option['Type'] == 'int'
 					if as_one == 1
-						let args += [switch . '=' . a:options[option['VimOptionMap']]]
+						let args += [switch . '=' . a:options[option['Destination']]]
 					else
-						let args += [switch, a:options[option['VimOptionMap']]]
+						let args += [switch, a:options[option['Destination']]]
 					endif
 				elseif option['Type'] == 'list'
-					for entry in a:options[option['VimOptionMap']]
+					for entry in a:options[option['Destination']]
 						if as_one == 1
 							let args += [switch . '=' . entry]
 						else

plugin/TagHighlight/data/options.txt

 # Vim-only options: #
 #####################
 
-projects:
-	VimOptionMap:Projects
+Projects:
 	Type:dict
 	Default:{}
 	Help:Project-specific configuration options.
 
-language_detection_method:
-	VimOptionMap:LanguageDetectionMethods
+LanguageDetectionMethods:
 	Type:list
 	Default:Extension
 	Help:Specify methods to use for determining language for the file when reading highlight definitions.
 
-filetype_language_overrides:
-	VimOptionMap:FileTypeLanguageOverrides
+FileTypeLanguageOverrides:
 	Type:dict
 	Default:{}
 	Help:Match file types to languages manually (if FileType language detection method is enabled).
 
-extension_language_overrides:
-	VimOptionMap:ExtensionLanguageOverrides
+ExtensionLanguageOverrides:
 	Type:dict
 	Default:{}
 	Help:Match extensions to languages manually (if Extension language detection method is enabled).
 
-syntax_language_overrides:
-	VimOptionMap:SyntaxLanguageOverrides
+SyntaxLanguageOverrides:
 	Type:dict
 	Default:{}
 	Help:Match syntaxes to languages manually (if Syntax language detection method is enabled).
 
-disable_type_parsing:
-	VimOptionMap:DisableTypeParsing
+DisableTypeParsing:
 	Type:bool
 	Default:False
 	Help:Do not read types when opening a file
 
-parsing_skip_list:
-	VimOptionMap:ParsingSkipList
+ParsingSkipList:
 	Type:list
 	Default:[]
 	Help:List of files for which the type reading should be disabled
 
-def_dir_mode_priority:
-	VimOptionMap:DefaultDirModePriority
+DefaultDirModePriority:
 	Type:list
 	Default:[]
 	Help:List of methods (in order) to use when searching for tags/types etc
 	Note:Default is overridden in TagHighlight#Option#GetOption()
 
-max_dir_search_levels:
-	VimOptionMap:MaxDirSearchLevels
+MaxDirSearchLevels:
 	Type:int
 	Default:0
 	Help:How far up to search in UpFromFile or UpFromCurrent mode
 
-config_file_name:
-	VimOptionMap:ProjectConfigFileName
+ProjectConfigFileName:
 	Type:string
 	Default:taghl_config.txt
 	Help:File name for project specific configuration items
 
-tag_dir_mode_priority:
-	VimOptionMap:TagFileDirModePriority
+TagFileDirModePriority:
 	Type:list
 	Default:Default
 	Help:Optional override for dir mode priority for tag files specifically
 
-types_dir_mode_priority:
-	VimOptionMap:TypesFileDirModePriority
+TypesFileDirModePriority:
 	Type:list
 	Default:Default
 	Help:Optional override for dir mode priority for types files specifically
 
-config_dir_mode_priority:
-	VimOptionMap:ProjectConfigFileDirModePriority
+ProjectConfigFileDirModePriority:
 	Type:list
 	Default:Default
 	Help:Optional override for dir mode priority for project config files specifically
 
-cscope_dir_mode_priority:
-	VimOptionMap:CscopeFileDirModePriority
+CscopeFileDirModePriority:
 	Type:list
 	Default:Default
 	Help:Optional override for dir mode priority for cscope files specifically
 
-tag_file_directory:
-	VimOptionMap:TagFileDirectory
+TagFileDirectory:
 	Type:string
 	Default:None
 	Help:Explicitly specified location for tag file (corresponding to Explicit search mode)
 
-disable_tag_manager:
-	VimOptionMap:DisableTagManager
+DisableTagManager:
 	Type:bool
 	Default:False
 	Help:Disable automatic management of tags option
 
-types_file_directory:
-	VimOptionMap:TypesFileDirectory
+TypesFileDirectory:
 	Type:string
 	Default:None
 	Help:Explicitly specified location for types file (corresponding to Explicit search mode)
 
-config_file_directory:
-	VimOptionMap:ProjectConfigFileDirectory
+ProjectConfigFileDirectory:
 	Type:string
 	Default:None
 	Help:Explicitly specified location for project config file (corresponding to Explicit search mode)
 
-default_dir_mode_search_wildcards:
-	VimOptionMap:DefaultDirModeSearchWildcards
+DefaultDirModeSearchWildcards:
 	Type:list
 	Default:OPT(TagFileName),OPT(ProjectConfigFileName),OPT(CscopeFileName)
 	Help:When searching directories, wildcards to match against (if any matches, we'll use this directory)
 
-config_dir_mode_search_wildcards:
-	VimOptionMap:ProjectConfigFileSearchWildcards
+ProjectConfigFileSearchWildcards:
 	Type:list
 	Default:Default
 	Help:When searching directories for project config files, wildcards to match against (if any matches, we'll use this directory)
 
-cscope_dir_mode_search_wildcards:
-	VimOptionMap:CscopeFileSearchWildcards
+CscopeFileSearchWildcards:
 	Type:list
 	Default:Default
 	Help:When searching directories for cscope files, wildcards to match against (if any matches, we'll use this directory)
 
-tag_dir_mode_search_wildcards:
-	VimOptionMap:TagFileSearchWildcards
+TagFileSearchWildcards:
 	Type:list
 	Default:Default
 	Help:When searching directories for tag files, wildcards to match against (if any matches, we'll use this directory)
 
-types_dir_mode_search_wildcards:
-	VimOptionMap:TypesFileSearchWildcards
+TypesFileSearchWildcards:
 	Type:list
 	Default:Default
 	Help:When searching directories for types files, wildcards to match against (if any matches, we'll use this directory)
 
-ctags_executable:
-	VimOptionMap:CtagsExecutable
+CtagsExecutable:
 	Type:string
 	Default:None
 	Help:Name of the ctags executable, or full path to it
 
-cscope_executable:
-	VimOptionMap:CscopeExecutable
+CscopeExecutable:
 	Type:string
 	Default:None
 	Help:Name of the cscope executable, or full path to it
 
-forced_python_variant:
-	VimOptionMap:ForcedPythonVariant
+ForcedPythonVariant:
 	Type:string
 	Default:None
 	Help:Force the use of a specific variant (see help for PythonVariantPriority)
 
-python_variant_priority:
-	VimOptionMap:PythonVariantPriority
+PythonVariantPriority:
 	Type:list
 	Default:if_pyth3,if_pyth,python,compiled
 	Help:Search order for deciding which variant to use
 
-path_to_python:
-	VimOptionMap:PathToPython
+PathToPython:
 	Type:string
 	Default:None
 	Help:Location of the python executable or None to search the path
 
-pre_read_hooks:
-	VimOptionMap:PreReadHooks
+PreReadHooks:
 	Type:list
 	Default:[]
 	Help:List of function names to run before reading types.
 
-post_read_hooks:
-	VimOptionMap:PostReadHooks
+PostReadHooks:
 	Type:list
 	Default:[]
 	Help:List of function names to run after reading types.
 
-pre_update_hooks:
-	VimOptionMap:PreUpdateHooks
+PreUpdateHooks:
 	Type:list
 	Default:[]
 	Help:List of function names to run before updating types.
 
-post_update_hooks:
-	VimOptionMap:PostUpdateHooks
+PostUpdateHooks:
 	Type:list
 	Default:[]
 	Help:List of function names to run after updating types.
 
-hooks:
-	VimOptionMap:Hooks
+Hooks:
 	Type:dict
 	Default:{'PreUpdate': [], 'PostUpdate': [], 'PreRead': [], 'PostRead': []}
 	Help:Hooks dictionary (each entry is a list of strings containing functions to call; read functions take current file name and types suffix as parameters).
 
-forced_standard_libraries:
-	VimOptionMap:ForcedStandardLibraries
+ForcedStandardLibraries:
 	Type:list
 	Default:[]
 	Help:List of standard libraries which we should load regardless of whether the matchers match (as long as suffix is correct).
 
-disable_standard_libraries:
-	VimOptionMap:DisableStandardLibraries
+DisableStandardLibraries:
 	Type:bool
 	Default:False
 	Help:Don't try to load standard libraries.
 
-user_libraries:
-	VimOptionMap:UserLibraries
+UserLibraries:
 	Type:list
 	Default:[]
 	Help:List of user libraries to load (either relative to UserLibraryDir or absolute).
 
-user_library_dir:
-	VimOptionMap:UserLibraryDir
+UserLibraryDir:
 	Type:string
 	Default:.
 	Help:Location of user libraries that are specified with relative paths.
 
-use_existing_tagfile_if_present:
-	VimOptionMap:DoNotGenerateTagsIfPresent
+DoNotGenerateTagsIfPresent:
 	Type:bool
 	Default:False
 	Help:Do not generate tags if a tag file already exists.
 
-only_generate_types_if_present:
-	VimOptionMap:OnlyGenerateTypesIfPresent
+OnlyGenerateTypesIfPresent:
 	Type:bool
 	Default:False
 	Help:Only generate tags/types if a types file already exists.
 
-reload_colour_scheme:
-	VimOptionMap:ReloadColourScheme
+ReloadColourScheme:
 	Type:bool
 	Default:False
 	Help:Reload the colour scheme after reading types file (in case colours don't work properly)
 
-set_working_dir:
-	VimOptionMap:SetWorkingDir
+SetWorkingDir:
 	Type:bool
 	Default:False
 	Help:When loading a highlight file, set the working directory for the buffer to the types file path.
 
-only_generate_cscope_db_if_present:
-	VimOptionMap:CscopeOnlyIfPresent
+CscopeOnlyIfPresent:
 	Type:bool
 	Default:False
 	Help:Only generate cscope database if one already exists
 # Python script options: #
 ##########################
 
-debug_level:
+DebugLevel:
 	CommandLineSwitches:--debug
-	VimOptionMap:DebugLevel
 	Type:string
 	Default:Error
 	Help:Debug level for printing (how much debug output to produce)
 
-enable_cscope:
+EnableCscope:
 	CommandLineSwitches:--enable-cscope
-	VimOptionMap:EnableCscope
 	Type:bool
 	Default:False
 	Help:Enable cscope support in TagHighlight
 
-only_generate_cscope_db_for_c_code:
-	VimOptionMap:CscopeOnlyIfCCode
+CscopeOnlyIfCCode:
+	CommandLineSwitches:--cscope-only-if-c-code
 	Type:bool
 	Default:True
 	Help:Only generate cscope database if one exists or if code is C code.
 
-cscope_file_name:
+CscopeFileName:
 	CommandLineSwitches:--cscope-filename
-	VimOptionMap:CscopeFileName
 	Type:string
 	Default:cscope.out
 	Help:Filename for cscope database
 
-cscope_file_directory:
+CscopeFileDirectory:
 	CommandLineSwitches:--cscope-file-directory
-	VimOptionMap:CscopeFileDirectory
 	Type:string
 	Default:None
 	Help:Explicitly specified location for cscope file (corresponding to Explicit search mode)
 
-debug_file:
+DebugFile:
 	CommandLineSwitches:--debug-file
-	VimOptionMap:DebugFile
 	Type:string
 	Default:None
 	Help:Debug log file into which messages should be stored
 
-language_tag_types:
+LanguageTagTypes:
 	CommandLineSwitches:--language-tag-types
-	VimOptionMap:LanguageTagTypes
 	Type:dict
 	Default:{}
 	Help:Explicit filter on tag types for a given language
 
-debug_print_time:
+DebugPrintTime:
 	CommandLineSwitches:--print-time-with-debug
-	VimOptionMap:DebugPrintTime
 	Type:bool
 	Default:False
 	Help:Print the time with each debug message in the log
 
-ignore_file_scope:
+IgnoreFileScope:
 	CommandLineSwitches:--ignore-file-scope
-	VimOptionMap:IgnoreFileScope
 	Type:bool
 	Default:False
 	Help:Ignore file-scope specified in tags file
 
-source_root:
+SourceDir:
 	CommandLineSwitches:-d,--source-root
-	VimOptionMap:SourceDir
 	Type:string
 	Default:None
 	Help:Location of source files to scan
 
-recurse:
+Recurse:
 	CommandLineSwitches:--no-recurse
-	VimOptionMap:Recurse
 	Type:bool
 	Default:True
 	Help:Recurse into subdirectories
  
-ctags_file:
+TagFileName:
 	CommandLineSwitches:--ctags-file
-	VimOptionMap:TagFileName
 	Type:string
 	Default:tags
 	Help:CTAGS output filename
 
-ctags_file_dir:
+CtagsFileLocation:
 	CommandLineSwitches:--ctags-file-dir
-	VimOptionMap:CtagsFileLocation
 	Type:string
 	Default:.
 	Help:Location in which to store or find CTAGS output file
 
-cscope_file_dir:
+CscopeFileLocation:
 	CommandLineSwitches:--cscope-file-dir
-	VimOptionMap:CscopeFileLocation
 	Type:string
 	Default:.
 	Help:Location in which to store or find cscope output file
 
-types_file_name_override:
+TypesFileNameForce:
 	CommandLineSwitches:--types-file-name-override
-	VimOptionMap:TypesFileNameForce
 	Type:string
 	Default:None
 	Help:Force types filename to be a specific string (as opposed to prefix + _ + suffix + . + extension).
 
-types_file_prefix:
+TypesFilePrefix:
 	CommandLineSwitches:--types-file-prefix
-	VimOptionMap:TypesFilePrefix
 	Type:string
 	Default:types
 	Help:Vim Types file prefix
 
-types_file_extension:
+TypesFileExtension:
 	CommandLineSwitches:--types-file-extension
-	VimOptionMap:TypesFileExtension
 	Type:string
 	Default:taghl
 	Help:Extension for types file (by default 'taghl', which with default prefix gives types_c.taghl for C files).
 
-skip_patterns:
+SkipPatterns:
 	CommandLineSwitches:--add-skip-pattern
-	VimOptionMap:SkipPatterns
 	Type:list
 	Default:[]
 	Help:List of (Python) regular expressions to match against keywords which should be excluded from the types file.
 
-skip_reserved_keywords:
+SkipReservedKeywords:
 	CommandLineSwitches:--skip-reserved-keywords
-	VimOptionMap:SkipReservedKeywords
 	Type:bool
 	Default:True
 	Help:Don't highlight keywords that are reserved in a given language.
  
-ctags_exe_full:
+CtagsExeFull:
 	CommandLineSwitches:--ctags-exe-full-path
-	VimOptionMap:CtagsExeFull
 	Type:string
 	Default:ctags
 	Help:CTAGS Executable Directory
 
-cscope_exe_full:
+CscopeExeFull:
 	CommandLineSwitches:--cscope-exe-full-path
-	VimOptionMap:CscopeExeFull
 	Type:string
 	Default:cscope
 	Help:Cscope Executable Directory
 
-ctags_arguments:
+CtagsArguments:
 	CommandLineSwitches:--add-ctags-argument
-	VimOptionMap:CtagsArguments
 	Type:list
 	Default:[]
 	Help:Explicit list of arguments to pass to ctags (for use with non-recognised ctags implementations).
 
-ctags_extra_arguments:
+CtagsExtraArguments:
 	CommandLineSwitches:--add-extra-ctags-argument
-	VimOptionMap:CtagsExtraArguments
 	Type:list
 	Default:[]
 	Help:List of extra arguments to pass to ctags.
 
-ctags_variant:
+CtagsVariant:
 	CommandLineSwitches:--ctags-variant
-	VimOptionMap:CtagsVariant
 	Type:string
 	Default:exuberant
 	Help:Tells TagHighlight which variant of ctags is being used: some have different requirements for their arguments.
  
-include_docs:
+IncludeDocs:
 	CommandLineSwitches:--include-docs
+	PythonOnly:True
 	Type:bool
 	Default:False
 	Help:Include docs or Documentation directory (stripped by default for speed)
  
-check_keywords:
+CheckKeywords:
 	CommandLineSwitches:--do-not-check-keywords
+	PythonOnly:True
 	Type:bool
 	Default:True
 	Help:Do not check validity of keywords (for speed)
  
-include_matches:
+IncludeSynMatches:
 	CommandLineSwitches:--include-invalid-keywords-as-matches
-	VimOptionMap:IncludeSynMatches
 	Type:bool
 	Default:False
 	Help:Include invalid keywords as regular expression matches (may slow it loading)
  
-skip_vimkeywords:
+SkipVimKeywords:
 	CommandLineSwitches:--exclude-vim-keywords
-	VimOptionMap:SkipVimKeywords
 	Type:bool
 	Default:False
 	Help:Don't include Vim keywords (they have to be matched with regular expression matches, which is slower)
  
-parse_constants:
+ParseConstants:
 	CommandLineSwitches:--do-not-analyse-constants
+	PythonOnly:True
 	Type:bool
 	Default:True
 	Help:Do not treat constants as separate entries
  
-languages:
+Languages:
 	CommandLineSwitches:--include-language
-	VimOptionMap:Languages
 	Type:list
 	Default:[]
 	Help:Only include specified languages
  
-types_file_location:
+TypesFileLocation:
 	CommandLineSwitches:--types-file-location
-	VimOptionMap:TypesFileLocation
 	Type:string
 	Default:.
 	Help:Specify the location for the generated types files
  
-include_locals:
+IncludeLocals:
 	CommandLineSwitches:--include-locals
-	VimOptionMap:IncludeLocals
 	Type:bool
 	Default:False
 	Help:Include local variables in the database
  
-use_existing_tagfile:
+DoNotGenerateTags:
 	CommandLineSwitches:--use-existing-tagfile
-	VimOptionMap:DoNotGenerateTags
 	Type:bool
 	Default:False
 	Help:Do not generate tags: use an existing file
  
-print_py_version:
+PrintPyVersion:
 	CommandLineSwitches:--pyversion
+	PythonOnly:True
 	Type:bool
 	Default:False
 	Help:Just print the version of python
 
-print_config:
+PrintConfig:
 	CommandLineSwitches:--print-config
+	PythonOnly:True
 	Type:bool
 	Default:False
 	Help:Parse the various options and then print the configuration and exit (for debugging)

plugin/TagHighlight/module/config.py

         # Compiled variant, executable should be in
         # plugin/TagHighlight/Compiled/Win32, so data
         # is in ../../data relative to executable
-        config['data_directory'] = os.path.abspath(
+        config['DataDirectory'] = os.path.abspath(
                 os.path.join(os.path.dirname(sys.executable),
                 '../../data'))
-        config['version_info_dir'] = os.path.abspath(os.path.dirname(sys.executable))
+        config['VersionInfoDir'] = os.path.abspath(os.path.dirname(sys.executable))
     else:
         # Script variant: this file in
         # plugin/TagHighlight/module, so data is in
         # ../data relative to this file
-        config['data_directory'] = os.path.abspath(
+        config['DataDirectory'] = os.path.abspath(
                 os.path.join(os.path.dirname(__file__),
                 '../data'))
-        config['version_info_dir'] = config['data_directory']
+        config['VersionInfoDir'] = config['DataDirectory']
 
-    SetLoadDataDirectory(config['data_directory'])
+    SetLoadDataDirectory(config['DataDirectory'])
 
-    if not os.path.exists(config['data_directory']):
+    if not os.path.exists(config['DataDirectory']):
         raise IOError("Data directory doesn't exist, have you installed the main distribution?")
 
 def LoadVersionInfo():
     global config
     data = LoadDataFile('release.txt')
-    config['release'] = data['release']
+    config['Release'] = data['release']
 
     try:
-        config['version'] = LoadFile(os.path.join(config['version_info_dir'],'version_info.txt'))
+        config['Version'] = LoadFile(os.path.join(config['VersionInfoDir'],'version_info.txt'))
     except IOError:
-        config['version'] = {
+        config['Version'] = {
                 'clean': 'Unreleased',
                 'date': 'Unreleased',
                 'revision_id': 'Unreleased',
     global config
     for key in new_options:
         config[key] = new_options[key]
-    if 'debug_level' in config:
-        SetDebugLogLevel(config['debug_level'])
-    if 'debug_file' in config:
-        SetDebugLogFile(config['debug_file'])
+    if 'DebugLevel' in config:
+        SetDebugLogLevel(config['DebugLevel'])
+    if 'DebugFile' in config:
+        SetDebugLogFile(config['DebugFile'])
 
 def LoadLanguages():
     global config
-    if 'language_handler' in config:
+    if 'LanguageHandler' in config:
         return
     from .languages import Languages
-    config['language_handler'] = Languages(config)
+    config['LanguageHandler'] = Languages(config)
 
-    full_language_list = config['language_handler'].GetAllLanguages()
-    if len(config['languages']) == 0:
+    full_language_list = config['LanguageHandler'].GetAllLanguages()
+    if len(config['Languages']) == 0:
         # Include all languages
-        config['language_list'] = full_language_list
+        config['LanguageList'] = full_language_list
     else:
-        config['language_list'] = [i for i in full_language_list if i in config['languages']]
-    Debug("Languages:\n\t{0!r}\n\t{1!r}".format(full_language_list, config['language_list']), "Information")
+        config['LanguageList'] = [i for i in full_language_list if i in config['Languages']]
+    Debug("Languages:\n\t{0!r}\n\t{1!r}".format(full_language_list, config['LanguageList']), "Information")
 
 SetDataDirectories()
 LoadVersionInfo()

plugin/TagHighlight/module/cscope_interface.py

 
 def StartCscopeDBGeneration(options):
     global cscopeThread
-    root = options['source_root']
+    root = options['SourceDir']
 
-    args = ['-b', '-f', options['cscope_file_full']]
+    args = ['-b', '-f', options['CscopeFileFull']]
 
-    if options['recurse']:
+    if options['Recurse']:
         args.append('-R')
 
-    cscope_cmd = [options['cscope_exe_full']] + args
+    cscope_cmd = [options['CscopeExeFull']] + args
 
     Debug("cscope command is " + repr(cscope_cmd), "Information")
 

plugin/TagHighlight/module/ctags_interface.py

 
     # Change the working directory to the source root
     # now so that argument globs work correctly.
-    os.chdir(options['source_root'])
+    os.chdir(options['SourceDir'])
 
-    if 'ctags_arguments' in options:
-        args = options['ctags_arguments']
+    if 'CtagsArguments' in options:
+        args = options['CtagsArguments']
     else:
-        if 'ctags_variant' in options:
-            variant = options['ctags_variant']
+        if 'CtagsVariant' in options:
+            variant = options['CtagsVariant']
         else:
             variant = 'exuberant'
         args = ctags_variant_args[variant](options)
 
-    ctags_cmd = [options['ctags_exe_full']] + args
+    ctags_cmd = [options['CtagsExeFull']] + args
 
     Debug("ctags command is " + repr(ctags_cmd), "Information")
 
             )#, shell=True)
     (sout, serr) = process.communicate()
 
-    tagFile = open(os.path.join(options['ctags_file_dir'], options['ctags_file']), 'r')
+    tagFile = open(os.path.join(options['CtagsFileLocation'], options['TagFileName']), 'r')
     tagLines = [line.strip() for line in tagFile]
     tagFile.close()
 
     # Also sort the file a bit better (tag, then kind, then filename)
     tagLines.sort(key=ctags_key)
 
-    tagFile = open(os.path.join(options['ctags_file_dir'],options['ctags_file']), 'w')
+    tagFile = open(os.path.join(options['CtagsFileLocation'],options['TagFileName']), 'w')
     for line in tagLines:
         tagFile.write(line + "\n")
     tagFile.close()
 
     Each entry is a list of tags with all the required details.
     """
-    languages = options['language_handler']
+    languages = options['LanguageHandler']
     kind_list = languages.GetKindList()
 
     # Language: {Type: set([keyword, keyword, keyword])}
                 languages.GetLanguageHandler(key)['PythonExtensionMatcher'] +
                 ')\t')
 
-    p = open(os.path.join(options['ctags_file_dir'],options['ctags_file']), 'r')
+    p = open(os.path.join(options['CtagsFileLocation'],options['TagFileName']), 'r')
     while 1:
         try:
             line = p.readline()
                         short_kind = 'ctags_' + m.group('kind')
                         kind = kind_list[key][short_kind]
                         keyword = m.group('keyword')
-                        if options['parse_constants'] and \
+                        if options['ParseConstants'] and \
                                 (key == 'c') and \
                                 (kind == 'CTagsGlobalVariable'):
                             if field_const.search(m.group('search')) is not None:
                                 kind = 'CTagsConstant'
-                        if key in options['language_tag_types']:
-                            if m.group('kind') in options['language_tag_types'][key]:
+                        if key in options['LanguageTagTypes']:
+                            if m.group('kind') in options['LanguageTagTypes'][key]:
                                 new_entry = keyword
                         elif m.group('kind') not in languages.GetLanguageHandler(key)['SkipList']:
                             new_entry = keyword
                         if new_entry is None:
                             continue
 
-                        if m.group('scope') is None or options['ignore_file_scope']:
+                        if m.group('scope') is None or options['IgnoreFileScope']:
                             ctags_entries[key][kind].add(new_entry)
                         else:
                             if m.group('filename') not in file_entries:
 def ExuberantGetCommandArgs(options):
     args = []
 
-    ctags_languages = [l['CTagsName'] for l in options['language_handler'].GetAllLanguageHandlers()]
+    ctags_languages = [l['CTagsName'] for l in options['LanguageHandler'].GetAllLanguageHandlers()]
     if 'c' in ctags_languages:
         ctags_languages.append('c++')
     args += ["--languages=" + ",".join(ctags_languages)]
 
-    if options['ctags_file']:
-        args += ['-f', os.path.join(options['ctags_file_dir'], options['ctags_file'])]
+    if options['TagFileName']:
+        args += ['-f', os.path.join(options['CtagsFileLocation'], options['TagFileName'])]
 
-    if not options['include_docs']:
+    if not options['IncludeDocs']:
         args += ["--exclude=docs", "--exclude=Documentation"]
 
-    if options['include_locals']:
+    if options['IncludeLocals']:
         Debug("Including local variables in tag generation", "Information")
-        kinds = options['language_handler'].GetKindList()
+        kinds = options['LanguageHandler'].GetKindList()
         def FindLocalVariableKinds(language_kinds):
             """Finds the key associated with a value in a dictionary.
 
             else:
                 Debug("Skipping language: " + language, "Information")
 
-    if options['recurse']:
+    if options['Recurse']:
         args += ['--recurse']
 
     args += ['--fields=+iaSszt']
 
     # If user specified extra arguments are required, add them
     # immediately before the file list
-    if 'ctags_extra_arguments' in options:
-        args += options['ctags_extra_arguments']
+    if 'CtagsExtraArguments' in options:
+        args += options['CtagsExtraArguments']
 
     # Must be last as it includes the file list:
-    if options['recurse']:
+    if options['Recurse']:
         args += ['.']
     else:
-        args += glob.glob(os.path.join(options['source_root'],'*'))
+        args += glob.glob(os.path.join(options['SourceDir'],'*'))
 
     Debug("Command arguments: " + repr(args), "Information")
 
 
 def JSCtagsGetCommandArgs(options):
     args = []
-    if options['ctags_file']:
-        args += ['-f', os.path.join(options['ctags_file_dir'], options['ctags_file'])]
+    if options['TagFileName']:
+        args += ['-f', os.path.join(options['CtagsFileLocation'], options['TagFileName'])]
 
     # If user specified extra arguments are required, add them
     # immediately before the file list
-    if 'ctags_extra_arguments' in options:
-        args += options['ctags_extra_arguments']
+    if 'CtagsExtraArguments' in options:
+        args += options['CtagsExtraArguments']
 
     # jsctags isn't very ctags-compatible: if you give it a directory
     # and expect it to recurse, it fails on the first non-javascript
     # extensions and we have to find them ourselves.  This may well fail
     # on Windows if there are a lot of them due to the limited command
     # length on Windows.
-    if options['recurse']:
+    if options['Recurse']:
         args += rglob('.', '*.js')
     else:
         args += glob.glob('*.js')

plugin/TagHighlight/module/generation.py

         tag_types = list(tags.keys())
         tag_types.sort()
 
-        language_handler = options['language_handler'].GetLanguageHandler(language)
+        language_handler = options['LanguageHandler'].GetLanguageHandler(language)
 
-        if options['check_keywords']:
+        if options['CheckKeywords']:
             iskeyword = GenerateValidKeywordRange(language_handler['IsKeyword'])
             Debug("Is Keyword is {0!r}".format(iskeyword), "Information")
 
         matchEntries = set()
         vimtypes_entries = []
 
-        typesUsedByLanguage = list(options['language_handler'].GetKindList(language).values())
+        typesUsedByLanguage = list(options['LanguageHandler'].GetKindList(language).values())
         # TODO: This may be included elsewhere, but we'll leave it in for now
         #clear_string = 'silent! syn clear ' + " ".join(typesUsedByLanguage)
 
         Debug("Type priority list: " + repr(allTypes), "Information")
 
         patternREs = []
-        for pattern in options['skip_patterns']:
+        for pattern in options['SkipPatterns']:
             patternREs.append(re.compile(pattern))
 
         all_keywords = []
                     continue
                 all_keywords.append(keyword)
 
-                if options['skip_reserved_keywords']:
+                if options['SkipReservedKeywords']:
                     if keyword in language_handler['ReservedKeywords']:
                         Debug('Skipping reserved word ' + keyword, 'Information')
                         # Ignore this keyword
                 if skip_this:
                     continue
 
-                if options['check_keywords']:
+                if options['CheckKeywords']:
                     # In here we should check that the keyword only matches
                     # vim's \k parameter (which will be different for different
                     # languages).  This is quite slow so is turned off by
                     # be worth optimising IsValidKeyword at some point.
                     if not IsValidKeyword(keyword, iskeyword):
                         matchDone = False
-                        if options['include_matches']:
+                        if options['IncludeSynMatches']:
 
                             patternCharacters = "/@#':"
                             charactersToEscape = '\\' + '~[]*.$^'
                                     escapedKeyword = keyword
                                     for ch in charactersToEscape:
                                         escapedKeyword = escapedKeyword.replace(ch, '\\' + ch)
-                                    if options['include_matches']:
+                                    if options['IncludeSynMatches']:
                                         matchEntries.add('syn match ' + thisType + ' ' + patChar + escapedKeyword + patChar)
                                     matchDone = True
                                     break
 
 
                 if keyword.lower() in vim_synkeyword_arguments:
-                    if not options['skip_vimkeywords']:
+                    if not options['SkipVimKeywords']:
                         matchEntries.add('syn match ' + thisType + ' /' + keyword + '/')
                     continue
 
         else:
             entry_sets[source_file] = vimtypes_entries[:]
 
-    if options['include_locals']:
+    if options['IncludeLocals']:
         LocalTagType = ',CTagsLocalVariable'
     else:
         LocalTagType = ''
 
-    if options['types_file_name_override'] is not None and options['types_file_name_override'] != 'None':
-        type_file_name = options['types_file_name_override']
+    if options['TypesFileNameForce'] is not None and options['TypesFileNameForce'] != 'None':
+        type_file_name = options['TypesFileNameForce']
     else:
-        type_file_name = options['types_file_prefix'] + '_' + language_handler['Suffix'] + '.' + options['types_file_extension']
-    filename = os.path.join(options['types_file_location'], type_file_name)
+        type_file_name = options['TypesFilePrefix'] + '_' + language_handler['Suffix'] + '.' + options['TypesFileExtension']
+    filename = os.path.join(options['TypesFileLocation'], type_file_name)
     Debug("Filename is {0}\n".format(filename), "Information")
 
     try:
                 prefix = '\t'
                 vimtypes_entries = entry_sets[source_file]
 
-            if source_file is not None and not options['ignore_file_scope']:
+            if source_file is not None and not options['IgnoreFileScope']:
                 formatted_file = os.path.normpath(source_file).replace(os.path.sep, '/')
                 fh.write('" Matches for file %s:\n' % source_file)
                 fh.write('if b:TagHighlightPrivate["NormalisedPath"] == "%s"\n' % formatted_file)
                     Debug("Error decoding line '{0!r}'".format(line), "Error")
                     fh.write('echoerr "Types generation error"\n'.encode('ascii'))
                 fh.write('\n'.encode('ascii'))
-            if source_file is not None and not options['ignore_file_scope']:
+            if source_file is not None and not options['IgnoreFileScope']:
                 fh.write('endif\n')
     except IOError:
         Debug("ERROR: Couldn't write {file} contents\n".format(file=outfile), "Error")

plugin/TagHighlight/module/options.py

         # Check we've got all of the required keys
         for key in RequiredKeys:
             if key not in AllOptions[dest]:
-                if 'VimOptionMap' in AllOptions[dest]:
+                if 'CommandLineSwitches' not in AllOptions[dest]:
                     # This is probably just a Vim option: ignore
                     pass
                 else:

plugin/TagHighlight/module/worker.py

     SetInitialOptions(options)
 
     Debug("Running types highlighter generator", "Information")
-    Debug("Release:" + config['release'], "Information")
-    Debug("Version:" + repr(config['version']), "Information")
+    Debug("Release:" + config['Release'], "Information")
+    Debug("Version:" + repr(config['Version']), "Information")
     Debug("Options:" + repr(options), "Information")
 
-    tag_file_absolute = os.path.join(config['ctags_file_dir'], config['ctags_file'])
-    if config['use_existing_tagfile'] and not os.path.exists(tag_file_absolute):
+    tag_file_absolute = os.path.join(config['CtagsFileLocation'], config['TagFileName'])
+    if config['DoNotGenerateTags'] and not os.path.exists(tag_file_absolute):
         Debug("Cannot use existing tagfile as it doesn't exist (checking for " + tag_file_absolute + ")", "Error")
         return
 
     LoadLanguages()
 
-    if config['print_config']:
+    if config['PrintConfig']:
         import pprint
         pprint.pprint(config)
         return
 
-    if config['print_py_version']:
+    if config['PrintPyVersion']:
         print(sys.version)
         return
 
     from .generation import CreateTypesFile
 
     cscope_check_c = False
-    if config['enable_cscope']:
-        cscope_file = os.path.join(config['cscope_file_dir'], config['cscope_file_name'])
-        config['cscope_file_full'] = cscope_file
-        if os.path.exists(cscope_file) or not config['only_generate_cscope_db_for_c_code']:
+    if config['EnableCscope']:
+        cscope_file = os.path.join(config['CscopeFileLocation'], config['CscopeFileName'])
+        config['CscopeFileFull'] = cscope_file
+        if os.path.exists(cscope_file) or not config['CscopeOnlyIfCCode']:
             Debug("Running cscope", "Information")
             from .cscope_interface import StartCscopeDBGeneration, CompleteCscopeDBGeneration
             StartCscopeDBGeneration(config)
             Debug("Deferring cscope until C code detected", "Information")
             cscope_check_c = True
 
-    if not config['use_existing_tagfile']:
+    if not config['DoNotGenerateTags']:
         Debug("Generating tag file", "Information")
         GenerateTags(config)
     tag_db, file_tag_db = ParseTags(config)
 
-    for language in config['language_list']:
+    for language in config['LanguageList']:
         if language in tag_db:
             CreateTypesFile(config, language, tag_db[language], file_tag_db[language])
 
-    if config['enable_cscope']:
+    if config['EnableCscope']:
         if cscope_check_c and 'c' in tag_db:
             Debug("Running cscope as C code detected", "Information")
             from .cscope_interface import StartCscopeDBGeneration, CompleteCscopeDBGeneration