comparison plugin/gutentags.vim @ 119:a66d90fd758b

expand() g:gutentags_ctags_executable Allows "~/..." paths to work.
author Justin M. Keyes <justinkz@gmail.com>
date Sat, 14 May 2016 02:59:15 -0400
parents 6bbed9e4c01e
children 5776acb079cf
comparison
equal deleted inserted replaced
117:df3b0ca48013 119:a66d90fd758b
7 if v:version < 704 7 if v:version < 704
8 echoerr "gutentags: this plugin requires vim >= 7.4." 8 echoerr "gutentags: this plugin requires vim >= 7.4."
9 finish 9 finish
10 endif 10 endif
11 11
12 if !exists('g:gutentags_debug') 12 let g:gutentags_debug = get(g:, 'gutentags_debug', 0)
13 let g:gutentags_debug = 0
14 endif
15 13
16 if (exists('g:loaded_gutentags') || &cp) && !g:gutentags_debug 14 if (exists('g:loaded_gutentags') || &cp) && !g:gutentags_debug
17 finish 15 finish
18 endif 16 endif
19 if (exists('g:loaded_gutentags') && g:gutentags_debug) 17 if (exists('g:loaded_gutentags') && g:gutentags_debug)
20 echom "Reloaded gutentags." 18 echom "Reloaded gutentags."
21 endif 19 endif
22 let g:loaded_gutentags = 1 20 let g:loaded_gutentags = 1
23 21
24 if !exists('g:gutentags_trace') 22 let g:gutentags_trace = get(g:, 'gutentags_trace', 0)
25 let g:gutentags_trace = 0 23 let g:gutentags_fake = get(g:, 'gutentags_fake', 0)
26 endif 24 let g:gutentags_background_update = get(g:, 'gutentags_background_update', 1)
25 let g:gutentags_pause_after_update = get(g:, 'gutentags_pause_after_update', 0)
26 let g:gutentags_enabled = get(g:, 'gutentags_enabled', 1)
27 let g:gutentags_enabled_user_func = get(g:, 'gutentags_enabled_user_func', '')
28 let g:gutentags_modules = get(g:, 'gutentags_modules', ['ctags'])
27 29
28 if !exists('g:gutentags_fake') 30 let g:gutentags_project_root = get(g:, 'gutentags_project_root', [])
29 let g:gutentags_fake = 0
30 endif
31
32 if !exists('g:gutentags_background_update')
33 let g:gutentags_background_update = 1
34 endif
35
36 if !exists('g:gutentags_pause_after_update')
37 let g:gutentags_pause_after_update = 0
38 endif
39
40 if !exists('g:gutentags_enabled')
41 let g:gutentags_enabled = 1
42 endif
43
44 if !exists('g:gutentags_enabled_user_func')
45 let g:gutentags_enabled_user_func = ''
46 endif
47
48 if !exists('g:gutentags_modules')
49 let g:gutentags_modules = ['ctags']
50 endif
51
52 if !exists('g:gutentags_project_root')
53 let g:gutentags_project_root = []
54 endif
55 let g:gutentags_project_root += ['.git', '.hg', '.svn', '.bzr', '_darcs', '_FOSSIL_', '.fslckout'] 31 let g:gutentags_project_root += ['.git', '.hg', '.svn', '.bzr', '_darcs', '_FOSSIL_', '.fslckout']
56 32
57 if !exists('g:gutentags_project_info') 33 let g:gutentags_project_info = get(g:, 'gutentags_project_info', [])
58 let g:gutentags_project_info = []
59 endif
60 call add(g:gutentags_project_info, {'type': 'python', 'file': 'setup.py'}) 34 call add(g:gutentags_project_info, {'type': 'python', 'file': 'setup.py'})
61 call add(g:gutentags_project_info, {'type': 'ruby', 'file': 'Gemfile'}) 35 call add(g:gutentags_project_info, {'type': 'ruby', 'file': 'Gemfile'})
62 36
63 if !exists('g:gutentags_exclude') 37 let g:gutentags_exclude = get(g:, 'gutentags_exclude', [])
64 let g:gutentags_exclude = [] 38 let g:gutentags_resolve_symlinks = get(g:, 'gutentags_resolve_symlinks', 0)
65 endif 39 let g:gutentags_generate_on_new = get(g:, 'gutentags_generate_on_new', 1)
66 40 let g:gutentags_generate_on_missing = get(g:, 'gutentags_generate_on_missing', 1)
67 if !exists('g:gutentags_resolve_symlinks') 41 let g:gutentags_generate_on_write = get(g:, 'gutentags_generate_on_write', 1)
68 let g:gutentags_resolve_symlinks = 0
69 endif
70
71 if !exists('g:gutentags_generate_on_new')
72 let g:gutentags_generate_on_new = 1
73 endif
74
75 if !exists('g:gutentags_generate_on_missing')
76 let g:gutentags_generate_on_missing = 1
77 endif
78
79 if !exists('g:gutentags_generate_on_write')
80 let g:gutentags_generate_on_write = 1
81 endif
82 42
83 if !exists('g:gutentags_cache_dir') 43 if !exists('g:gutentags_cache_dir')
84 let g:gutentags_cache_dir = '' 44 let g:gutentags_cache_dir = ''
85 else 45 else
86 " Make sure we get an absolute/resolved path (e.g. expanding `~/`), and 46 " Make sure we get an absolute/resolved path (e.g. expanding `~/`), and
87 " strip any trailing slash. 47 " strip any trailing slash.
88 let g:gutentags_cache_dir = fnamemodify(g:gutentags_cache_dir, ':p') 48 let g:gutentags_cache_dir = fnamemodify(g:gutentags_cache_dir, ':p')
89 let g:gutentags_cache_dir = fnamemodify(g:gutentags_cache_dir, ':s?[/\\]$??') 49 let g:gutentags_cache_dir = fnamemodify(g:gutentags_cache_dir, ':s?[/\\]$??')
90 endif 50 endif
91 51
92 if !exists('g:gutentags_define_advanced_commands') 52 let g:gutentags_define_advanced_commands = get(g:, 'gutentags_define_advanced_commands', 0)
93 let g:gutentags_define_advanced_commands = 0
94 endif
95 53
96 if g:gutentags_cache_dir != '' && !isdirectory(g:gutentags_cache_dir) 54 if g:gutentags_cache_dir != '' && !isdirectory(g:gutentags_cache_dir)
97 call mkdir(g:gutentags_cache_dir, 'p') 55 call mkdir(g:gutentags_cache_dir, 'p')
98 endif 56 endif
99 57