11" Vim script
22" Author: Peter Odding <peter@peterodding.com>
3- " Last Change: July 9 , 2011
3+ " Last Change: August 27 , 2011
44" URL: http://peterodding.com/code/vim/easytags/
55
6+ let g: xolox #easytags#version = ' 2.4.12'
7+
68" Public interface through (automatic) commands. {{{1
79
810function ! xolox#easytags#register (global ) " {{{2
@@ -65,7 +67,7 @@ function! xolox#easytags#autoload() " {{{2
6567 endif
6668 endif
6769 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 )
6971 endtry
7072endfunction
7173
@@ -88,13 +90,13 @@ function! xolox#easytags#update(silent, filter_tags, filenames) " {{{2
8890 endif
8991 if cfile != ' '
9092 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)
9294 elseif have_args
9395 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)
9597 else
9698 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)
98100 endif
99101 endif
100102 " When :UpdateTags was executed manually we'll refresh the dynamic
@@ -104,7 +106,7 @@ function! xolox#easytags#update(silent, filter_tags, filenames) " {{{2
104106 endif
105107 return 1
106108 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 )
108110 endtry
109111endfunction
110112
@@ -183,7 +185,7 @@ endfunction
183185function ! s: run_ctags (starttime, cfile , tagsfile, firstrun, cmdline) " {{{3
184186 let lines = []
185187 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 )
187189 try
188190 let lines = xolox#shell#execute (a: cmdline , 1 )
189191 catch /^Vim\%((\a\+)\)\=:E117/
@@ -197,9 +199,9 @@ function! s:run_ctags(starttime, cfile, tagsfile, firstrun, cmdline) " {{{3
197199 endtry
198200 if a: firstrun
199201 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 )
201203 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 )
203205 endif
204206 return []
205207 endif
@@ -298,7 +300,7 @@ function! xolox#easytags#highlight() " {{{2
298300 execute command
299301 catch /^Vim\%((\a\+)\)\=:E339/
300302 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 )
302304 endtry
303305 endif
304306 endif
@@ -309,11 +311,11 @@ function! xolox#easytags#highlight() " {{{2
309311 let bufname = ' unnamed buffer #' . bufnr (' %' )
310312 endif
311313 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)" : " " )
313315 return 1
314316 endif
315317 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 )
317319 endtry
318320endfunction
319321
@@ -330,7 +332,7 @@ function! xolox#easytags#by_filetype(undo) " {{{2
330332 call s: save_by_filetype (0 , headers, entries)
331333 call rename (global_tagsfile, disabled_tagsfile)
332334 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)
334336 else
335337 let headers = []
336338 let all_entries = []
@@ -339,10 +341,10 @@ function! xolox#easytags#by_filetype(undo) " {{{2
339341 call extend (all_entries, entries)
340342 endfor
341343 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 )
343345 endif
344346 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 )
346348 endtry
347349endfunction
348350
@@ -387,7 +389,7 @@ function! xolox#easytags#supported_filetypes() " {{{2
387389 endtry
388390 let s: supported_filetypes = map (copy (listing), ' s:check_filetype(listing, v:val)' )
389391 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)
391393 endif
392394 return s: supported_filetypes
393395endfunction
@@ -422,7 +424,7 @@ function! xolox#easytags#read_tagsfile(tagsfile) " {{{2
422424 endif
423425 endfor
424426 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 )
426428 endif
427429 return [headers, entries]
428430endfunction
@@ -504,7 +506,7 @@ function! s:cache_tagged_files() " {{{3
504506 endif
505507 endif
506508 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)
508510 endif
509511endfunction
510512
0 commit comments