comparison autoload/gutentags.vim @ 101:32e3d047e54e

add user autocmds for after tags updated
author David O'Trakoun <me@davidosomething.com>
date Sat, 13 Feb 2016 15:30:30 -0500
parents b9965d1288c3
children 7db339a3961f
comparison
equal deleted inserted replaced
91:54355724204b 101:32e3d047e54e
260 " (Re)Generate the tags file for the current buffer's file. 260 " (Re)Generate the tags file for the current buffer's file.
261 function! s:manual_update_tags(bang) abort 261 function! s:manual_update_tags(bang) abort
262 for module in g:gutentags_modules 262 for module in g:gutentags_modules
263 call s:update_tags(module, a:bang, 0) 263 call s:update_tags(module, a:bang, 0)
264 endfor 264 endfor
265 silent doautocmd User GutentagsUpdated
265 endfunction 266 endfunction
266 267
267 " (Re)Generate the tags file for a buffer that just go saved. 268 " (Re)Generate the tags file for a buffer that just go saved.
268 function! s:write_triggered_update_tags() abort 269 function! s:write_triggered_update_tags() abort
269 if g:gutentags_enabled && g:gutentags_generate_on_write 270 if g:gutentags_enabled && g:gutentags_generate_on_write
270 for module in g:gutentags_modules 271 for module in g:gutentags_modules
271 call s:update_tags(module, 0, 2) 272 call s:update_tags(module, 0, 2)
272 endfor 273 endfor
273 endif 274 endif
275 silent doautocmd User GutentagsUpdated
274 endfunction 276 endfunction
275 277
276 " Update the tags file for the current buffer's file. 278 " Update the tags file for the current buffer's file.
277 " write_mode: 279 " write_mode:
278 " 0: update the tags file if it exists, generate it otherwise. 280 " 0: update the tags file if it exists, generate it otherwise.