comparison plugin/gutentags.vim @ 120:5776acb079cf

Merge pull request #84 from GitHub.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 13 Jun 2016 18:25:02 -0700
parents 2838af9ff980 a66d90fd758b
children e673026faa56
comparison
equal deleted inserted replaced
118:2838af9ff980 120:5776acb079cf
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_exclude_project_root = get(g:, 'gutentags_exclude_project_root', ['/usr/local'])
65 endif 39 let g:gutentags_resolve_symlinks = get(g:, 'gutentags_resolve_symlinks', 0)
66 40 let g:gutentags_generate_on_new = get(g:, 'gutentags_generate_on_new', 1)
67 if !exists('g:gutentags_exclude_project_root') 41 let g:gutentags_generate_on_missing = get(g:, 'gutentags_generate_on_missing', 1)
68 let g:gutentags_exclude_project_root = ['/usr/local'] 42 let g:gutentags_generate_on_write = get(g:, 'gutentags_generate_on_write', 1)
69 endif
70
71 if !exists('g:gutentags_resolve_symlinks')
72 let g:gutentags_resolve_symlinks = 0
73 endif
74
75 if !exists('g:gutentags_generate_on_new')
76 let g:gutentags_generate_on_new = 1
77 endif
78
79 if !exists('g:gutentags_generate_on_missing')
80 let g:gutentags_generate_on_missing = 1
81 endif
82
83 if !exists('g:gutentags_generate_on_write')
84 let g:gutentags_generate_on_write = 1
85 endif
86 43
87 if !exists('g:gutentags_cache_dir') 44 if !exists('g:gutentags_cache_dir')
88 let g:gutentags_cache_dir = '' 45 let g:gutentags_cache_dir = ''
89 else 46 else
90 " Make sure we get an absolute/resolved path (e.g. expanding `~/`), and 47 " Make sure we get an absolute/resolved path (e.g. expanding `~/`), and
91 " strip any trailing slash. 48 " strip any trailing slash.
92 let g:gutentags_cache_dir = fnamemodify(g:gutentags_cache_dir, ':p') 49 let g:gutentags_cache_dir = fnamemodify(g:gutentags_cache_dir, ':p')
93 let g:gutentags_cache_dir = fnamemodify(g:gutentags_cache_dir, ':s?[/\\]$??') 50 let g:gutentags_cache_dir = fnamemodify(g:gutentags_cache_dir, ':s?[/\\]$??')
94 endif 51 endif
95 52
96 if !exists('g:gutentags_define_advanced_commands') 53 let g:gutentags_define_advanced_commands = get(g:, 'gutentags_define_advanced_commands', 0)
97 let g:gutentags_define_advanced_commands = 0
98 endif
99 54
100 if g:gutentags_cache_dir != '' && !isdirectory(g:gutentags_cache_dir) 55 if g:gutentags_cache_dir != '' && !isdirectory(g:gutentags_cache_dir)
101 call mkdir(g:gutentags_cache_dir, 'p') 56 call mkdir(g:gutentags_cache_dir, 'p')
102 endif 57 endif
103 58