On 09/06/09 16:28, Cyril snt wrote:
>
> Hello
>
> I know that several questions already exist about this problem.
> However, when I make a search in several files, I see something like
> that:
>
> "main.sh" [unix] 108L, 2504C
> "default.sh" [unix format] 46 lines, 745 characters
> E486: Pattern not found: TAG
> "ready.sh" [unix format] 37 lines, 733 characters
> E486: Pattern not found: TAG
> "restart.sh" [unix format] 33 lines, 429 characters
> E486: Pattern not found: TAG
> "smart_ipconfig.sh" [unix format] 69 lines, 1342 characters
> E486: Pattern not found: TAG
> "vlan_tag.sh" [unix format] 38 lines, 553 characters
> "write_conf.sh" [unix format] 21 lines, 253 characters
> E486: Pattern not found: TAG
>
> But I want to stop to the first occurence of the pattern. In my
> example, I need to stop in main.sh and if I remake the command in
> vlan_tag.sh.
>
> Can I do something like that ?
>
> Thanks for yours answers.
>
> Best regards,
> Cyril

I haven't yet seen the other replies, but I would use

        :0verbose vimgrep /TAG/g *.sh

which, after examining all the files mentioned, shows you the first 
occurrence (but tells you how many there are in all and allows you to go 
from one to the next). IIUC it gives no error for "files with no matches".


Best regards,
Tony.
-- 
Save energy: be apathetic.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to