1
1
" Vim script
2
2
" Author: Peter Odding <peter@peterodding.com>
3
- " Last Change: July 9 , 2011
3
+ " Last Change: August 27 , 2011
4
4
" URL: http://peterodding.com/code/vim/easytags/
5
5
6
+ let g: xolox #easytags#version = ' 2.4.12'
7
+
6
8
" Public interface through (automatic) commands. {{{1
7
9
8
10
function ! xolox#easytags#register (global ) " {{{2
@@ -65,7 +67,7 @@ function! xolox#easytags#autoload() " {{{2
65
67
endif
66
68
endif
67
69
catch
68
- call xolox#misc#msg#warn (" easytags.vim %s: %s (at %s)" , g: easytags_version , v: exception , v: throwpoint )
70
+ call xolox#misc#msg#warn (" easytags.vim %s: %s (at %s)" , g: xolox #easytags# version , v: exception , v: throwpoint )
69
71
endtry
70
72
endfunction
71
73
@@ -88,13 +90,13 @@ function! xolox#easytags#update(silent, filter_tags, filenames) " {{{2
88
90
endif
89
91
if cfile != ' '
90
92
let msg = " easytags.vim %s: Updated tags for %s in %s."
91
- call xolox#misc#timer#stop (msg, g: easytags_version , expand (' %:p:~' ), starttime)
93
+ call xolox#misc#timer#stop (msg, g: xolox #easytags# version , expand (' %:p:~' ), starttime)
92
94
elseif have_args
93
95
let msg = " easytags.vim %s: Updated tags in %s."
94
- call xolox#misc#timer#stop (msg, g: easytags_version , starttime)
96
+ call xolox#misc#timer#stop (msg, g: xolox #easytags# version , starttime)
95
97
else
96
98
let msg = " easytags.vim %s: Filtered %i invalid tags in %s."
97
- call xolox#misc#timer#stop (msg, g: easytags_version , num_filtered, starttime)
99
+ call xolox#misc#timer#stop (msg, g: xolox #easytags# version , num_filtered, starttime)
98
100
endif
99
101
endif
100
102
" When :UpdateTags was executed manually we'll refresh the dynamic
@@ -104,7 +106,7 @@ function! xolox#easytags#update(silent, filter_tags, filenames) " {{{2
104
106
endif
105
107
return 1
106
108
catch
107
- call xolox#misc#msg#warn (" easytags.vim %s: %s (at %s)" , g: easytags_version , v: exception , v: throwpoint )
109
+ call xolox#misc#msg#warn (" easytags.vim %s: %s (at %s)" , g: xolox #easytags# version , v: exception , v: throwpoint )
108
110
endtry
109
111
endfunction
110
112
@@ -183,7 +185,7 @@ endfunction
183
185
function ! s: run_ctags (starttime, cfile , tagsfile, firstrun, cmdline) " {{{3
184
186
let lines = []
185
187
if a: cmdline != ' '
186
- call xolox#misc#msg#debug (" easytags.vim %s: Executing %s." , g: easytags_version , a: cmdline )
188
+ call xolox#misc#msg#debug (" easytags.vim %s: Executing %s." , g: xolox #easytags# version , a: cmdline )
187
189
try
188
190
let lines = xolox#shell#execute (a: cmdline , 1 )
189
191
catch /^Vim\%((\a\+)\)\=:E117/
@@ -197,9 +199,9 @@ function! s:run_ctags(starttime, cfile, tagsfile, firstrun, cmdline) " {{{3
197
199
endtry
198
200
if a: firstrun
199
201
if a: cfile != ' '
200
- call xolox#misc#timer#stop (" easytags.vim %s: Created tags for %s in %s." , g: easytags_version , expand (' %:p:~' ), a: starttime )
202
+ call xolox#misc#timer#stop (" easytags.vim %s: Created tags for %s in %s." , g: xolox #easytags# version , expand (' %:p:~' ), a: starttime )
201
203
else
202
- call xolox#misc#timer#stop (" easytags.vim %s: Created tags in %s." , g: easytags_version , a: starttime )
204
+ call xolox#misc#timer#stop (" easytags.vim %s: Created tags in %s." , g: xolox #easytags# version , a: starttime )
203
205
endif
204
206
return []
205
207
endif
@@ -298,7 +300,7 @@ function! xolox#easytags#highlight() " {{{2
298
300
execute command
299
301
catch /^Vim\%((\a\+)\)\=:E339/
300
302
let msg = " easytags.vim %s: Failed to highlight %i %s tags because pattern is too big! (%i KB)"
301
- call xolox#misc#msg#warn (msg, g: easytags_version , len (matches), tagkind.hlgroup, len (pattern) / 1024 )
303
+ call xolox#misc#msg#warn (msg, g: xolox #easytags# version , len (matches), tagkind.hlgroup, len (pattern) / 1024 )
302
304
endtry
303
305
endif
304
306
endif
@@ -309,11 +311,11 @@ function! xolox#easytags#highlight() " {{{2
309
311
let bufname = ' unnamed buffer #' . bufnr (' %' )
310
312
endif
311
313
let msg = " easytags.vim %s: Highlighted tags in %s in %s%s."
312
- call xolox#misc#timer#stop (msg, g: easytags_version , bufname , starttime, used_python ? " (using Python)" : " " )
314
+ call xolox#misc#timer#stop (msg, g: xolox #easytags# version , bufname , starttime, used_python ? " (using Python)" : " " )
313
315
return 1
314
316
endif
315
317
catch
316
- call xolox#misc#msg#warn (" easytags.vim %s: %s (at %s)" , g: easytags_version , v: exception , v: throwpoint )
318
+ call xolox#misc#msg#warn (" easytags.vim %s: %s (at %s)" , g: xolox #easytags# version , v: exception , v: throwpoint )
317
319
endtry
318
320
endfunction
319
321
@@ -330,7 +332,7 @@ function! xolox#easytags#by_filetype(undo) " {{{2
330
332
call s: save_by_filetype (0 , headers, entries)
331
333
call rename (global_tagsfile, disabled_tagsfile)
332
334
let msg = " easytags.vim %s: Finished copying tags from %s to %s! Note that your old tags file has been renamed to %s instead of deleting it, should you want to restore it."
333
- call xolox#misc#msg#info (msg, g: easytags_version , g: easytags_file , g: easytags_by_filetype , disabled_tagsfile)
335
+ call xolox#misc#msg#info (msg, g: xolox #easytags# version , g: easytags_file , g: easytags_by_filetype , disabled_tagsfile)
334
336
else
335
337
let headers = []
336
338
let all_entries = []
@@ -339,10 +341,10 @@ function! xolox#easytags#by_filetype(undo) " {{{2
339
341
call extend (all_entries, entries)
340
342
endfor
341
343
call xolox#easytags#write_tagsfile (global_tagsfile, headers, all_entries)
342
- call xolox#misc#msg#info (" easytags.vim %s: Finished copying tags from %s to %s!" , g: easytags_version , g: easytags_by_filetype , g: easytags_file )
344
+ call xolox#misc#msg#info (" easytags.vim %s: Finished copying tags from %s to %s!" , g: xolox #easytags# version , g: easytags_by_filetype , g: easytags_file )
343
345
endif
344
346
catch
345
- call xolox#misc#msg#warn (" easytags.vim %s: %s (at %s)" , g: easytags_version , v: exception , v: throwpoint )
347
+ call xolox#misc#msg#warn (" easytags.vim %s: %s (at %s)" , g: xolox #easytags# version , v: exception , v: throwpoint )
346
348
endtry
347
349
endfunction
348
350
@@ -387,7 +389,7 @@ function! xolox#easytags#supported_filetypes() " {{{2
387
389
endtry
388
390
let s: supported_filetypes = map (copy (listing), ' s:check_filetype(listing, v:val)' )
389
391
let msg = " easytags.vim %s: Retrieved %i supported languages in %s."
390
- call xolox#misc#timer#stop (msg, g: easytags_version , len (s: supported_filetypes ), starttime)
392
+ call xolox#misc#timer#stop (msg, g: xolox #easytags# version , len (s: supported_filetypes ), starttime)
391
393
endif
392
394
return s: supported_filetypes
393
395
endfunction
@@ -422,7 +424,7 @@ function! xolox#easytags#read_tagsfile(tagsfile) " {{{2
422
424
endif
423
425
endfor
424
426
if num_invalid > 0
425
- call xolox#misc#msg#warn (" easytags.vim %s: Ignored %i invalid line(s) in %s!" , g: easytags_version , num_invalid, a: tagsfile )
427
+ call xolox#misc#msg#warn (" easytags.vim %s: Ignored %i invalid line(s) in %s!" , g: xolox #easytags# version , num_invalid, a: tagsfile )
426
428
endif
427
429
return [headers, entries]
428
430
endfunction
@@ -504,7 +506,7 @@ function! s:cache_tagged_files() " {{{3
504
506
endif
505
507
endif
506
508
endfor
507
- call xolox#misc#timer#stop (" easytags.vim %s: Initialized cache of tagged files in %s." , g: easytags_version , starttime)
509
+ call xolox#misc#timer#stop (" easytags.vim %s: Initialized cache of tagged files in %s." , g: xolox #easytags# version , starttime)
508
510
endif
509
511
endfunction
510
512
0 commit comments