diff plugin/gutentags.vim @ 153:738ac7a89547

Merge branch 'master' into my-develop
author Mark Wu <wuhsinyee@hotmail.com>
date Fri, 16 Sep 2016 23:43:57 +0800
parents 286e5b3095d0
children 7bc4df0225d1 3459a2522a3b
line wrap: on
line diff
--- a/plugin/gutentags.vim	Mon May 16 02:09:40 2016 +0800
+++ b/plugin/gutentags.vim	Fri Sep 16 23:43:57 2016 +0800
@@ -9,9 +9,7 @@
     finish
 endif
 
-if !exists('g:gutentags_debug')
-    let g:gutentags_debug = 0
-endif
+let g:gutentags_debug = get(g:, 'gutentags_debug', 0)
 
 if (exists('g:loaded_gutentags') || &cp) && !g:gutentags_debug
     finish
@@ -21,64 +19,32 @@
 endif
 let g:loaded_gutentags = 1
 
-if !exists('g:gutentags_trace')
-    let g:gutentags_trace = 0
-endif
-
-if !exists('g:gutentags_fake')
-    let g:gutentags_fake = 0
-endif
-
-if !exists('g:gutentags_background_update')
-    let g:gutentags_background_update = 1
-endif
-
-if !exists('g:gutentags_pause_after_update')
-    let g:gutentags_pause_after_update = 0
-endif
+let g:gutentags_trace = get(g:, 'gutentags_trace', 0)
+let g:gutentags_fake = get(g:, 'gutentags_fake', 0)
+let g:gutentags_background_update = get(g:, 'gutentags_background_update', 1)
+let g:gutentags_pause_after_update = get(g:, 'gutentags_pause_after_update', 0)
+let g:gutentags_enabled = get(g:, 'gutentags_enabled', 1)
+let g:gutentags_enabled_user_func = get(g:, 'gutentags_enabled_user_func', '')
+let g:gutentags_modules = get(g:, 'gutentags_modules', ['ctags'])
 
-if !exists('g:gutentags_enabled')
-    let g:gutentags_enabled = 1
+let g:gutentags_add_default_project_roots = get(g:, 'gutentags_add_default_project_roots', 1)
+let g:gutentags_project_root = get(g:, 'gutentags_project_root', [])
+if g:gutentags_add_default_project_roots
+    let g:gutentags_project_root += ['.git', '.hg', '.svn', '.bzr', '_darcs', '_FOSSIL_', '.fslckout']
 endif
-
-if !exists('g:gutentags_enabled_user_func')
-    let g:gutentags_enabled_user_func = ''
-endif
+let g:gutentags_project_root_finder = ''
 
-if !exists('g:gutentags_modules')
-    let g:gutentags_modules = ['ctags']
-endif
-
-if !exists('g:gutentags_project_root')
-    let g:gutentags_project_root = []
-endif
-let g:gutentags_project_root += ['.git', '.hg', '.svn', '.bzr', '_darcs', '_FOSSIL_', '.fslckout']
-
-if !exists('g:gutentags_project_info')
-    let g:gutentags_project_info = []
-endif
+let g:gutentags_project_info = get(g:, 'gutentags_project_info', [])
 call add(g:gutentags_project_info, {'type': 'python', 'file': 'setup.py'})
 call add(g:gutentags_project_info, {'type': 'ruby', 'file': 'Gemfile'})
 
-if !exists('g:gutentags_exclude')
-    let g:gutentags_exclude = []
-endif
-
-if !exists('g:gutentags_resolve_symlinks')
-    let g:gutentags_resolve_symlinks = 0
-endif
-
-if !exists('g:gutentags_generate_on_new')
-    let g:gutentags_generate_on_new = 1
-endif
-
-if !exists('g:gutentags_generate_on_missing')
-    let g:gutentags_generate_on_missing = 1
-endif
-
-if !exists('g:gutentags_generate_on_write')
-    let g:gutentags_generate_on_write = 1
-endif
+let g:gutentags_exclude = get(g:, 'gutentags_exclude', [])
+let g:gutentags_exclude_project_root = get(g:, 'gutentags_exclude_project_root', ['/usr/local'])
+let g:gutentags_resolve_symlinks = get(g:, 'gutentags_resolve_symlinks', 0)
+let g:gutentags_generate_on_new = get(g:, 'gutentags_generate_on_new', 1)
+let g:gutentags_generate_on_missing = get(g:, 'gutentags_generate_on_missing', 1)
+let g:gutentags_generate_on_write = get(g:, 'gutentags_generate_on_write', 1)
+let g:gutentags_file_list_command = get(g:, 'gutentags_file_list_command', '')
 
 if !exists('g:gutentags_cache_dir')
     let g:gutentags_cache_dir = ''
@@ -89,9 +55,7 @@
     let g:gutentags_cache_dir = fnamemodify(g:gutentags_cache_dir, ':s?[/\\]$??')
 endif
 
-if !exists('g:gutentags_define_advanced_commands')
-    let g:gutentags_define_advanced_commands = 0
-endif
+let g:gutentags_define_advanced_commands = get(g:, 'gutentags_define_advanced_commands', 0)
 
 if g:gutentags_cache_dir != '' && !isdirectory(g:gutentags_cache_dir)
     call mkdir(g:gutentags_cache_dir, 'p')