In order to keep my tags file up to date I wrote this function which runs ctags -R .
whenever I save a file.
function! UpdateCtags()
" assume if a tags file exists - then current dir is ok
if filereadable("tags")
echo "updating tags file"
call system('ctags -R .')
else
echo "unable to update tags file - probably wrong current dir"
endif
endfunction
au BufWritePost * silent! call UpdateCtags()
The function seems to work ok, but it triggers a prompts
"somefile" 508L, 16090C written updating tags file Press ENTER or type command to continue
Its not a major problem, but considering I save a file probably every 15 seconds, I want a message confirming the function ran to be printed, but I don't want to be interupted by a prompt.
.
Is it possible to make this prompt go away?
Ive tried adding silent!
to the autocmd
au BufWritePost * silent! call UpdateCtags()
But it seems to have no effect