Hi Anton!

On Mi, 03 Feb 2016, Anton Lindqvist wrote:

> Hi,
> This patch add a autocmd event called TagNotFound triggered when the requested
> tag was not found. The motivation for this event is as follows: I usually add
> the following to my vimrc in order to ensure my tags file is up-to-date:
> 
>   au BufWritePost * if filereadable('tags') | silent exe '!ctags -a %' | endif
> 
> However this seems wasteful since the majority of my writes don't include new
> identifiers to be indexed. With this patch the command above could be replaced
> with:
> 
>   au TagNotFound * if filereadable('tags') | silent exe '!ctags' | endif
> 
> Thus indexing would only be performed when a missing tag is requested. 
> 
> Another use-case for this new event would be to trigger a psearch when the tag
> was not found:
> 
>   au TagNotFound * exe 'psearch /' . expand('<amatch>') . '/'
> 

While I agree that this is useful, I have been thinking, if a more 
general approach would not be more useful. Something like an Error 
autocommand, that triggers on the EXXX numbers?

Best,
Christian
-- 
Neue Viren:
Reich-Ranicki Virus: Liest alle Ihre Textdateien ein, sendet sie ins
Internet und bewertet sie dort hinsichtlich ihrer literarischen Qualität.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui