Loading ...
Sorry, an error occurred while loading the content.

Re: next file/buffer

Expand Messages
  • Miroslaw Dobrzanski-Neumann
    Yes it works. Thanks Anyway, builtin ... would behave like ... -- Miroslaw Dobrzanski-Neumann MOSAIC SOFTWARE AG Abteilung Basisentwicklung und Forschung Tel
    Message 1 of 3 , Oct 2, 2002
    • 0 Attachment
      Yes it works. Thanks


      Anyway, builtin
      :bn .cc$
      would behave like
      :b .cc$ and n times <tab>




      On Wed, Oct 02, 2002 at 08:12:54AM -0500, Robert Hiestand wrote:
      > I suspect there is a better way, but here's a stab:
      >
      > function! LoadArgsRegex(regex)
      > silent! argd *
      > let index = bufnr('$')
      > while index > 0
      > if bufname(index) =~ a:regex
      > execute 'argadd' bufname(index)
      > endif
      > let index = index - 1
      > endwhile
      > rewind
      > endfunction
      >
      >
      > ... and, for example:
      >
      > call LoadArgsRegex('.cc$')
      >
      > Thanks,
      >
      > bob
      >
      > At 11:30+0200 Wed, 2 Oct 2002, Miroslaw Dobrzanski-Neumann wrote:
      >
      > > Hi,
      > >
      > > given the following situation:
      > >
      > > I have loaded plenty of files into vim. All buffers can be classified by some
      > > criterion i.e. file extension.
      > >
      > > How can I iterate thru all buffers belonging to a given category?
      > >
      > >
      > > What I am looking for is a command like:
      > >
      > > :bnext *.cc
      > >
      > > which would switch to the next buffer holding .cc file skipping all others
      > >
      > >
      > > Regards
      > > --
      > > Miroslaw Dobrzanski-Neumann
      > >
      > > MOSAIC SOFTWARE AG
      > > Base Development and Research
      > > Tel +49-2225-882-291
      > > Fax +49-2225-882-201
      > > Office: mne@...
      > > Home: mirek-dn@...
      > >
      > >
      >
      > ---
      > Robert Hiestand
      > Manager
      > Tallán
      > robert.hiestand@...
      > www.tallan.com
      >
      > "With a focused commitment to our clients and our people, we deliver value
      > through customized technology solutions"
      >
      >

      --
      Miroslaw Dobrzanski-Neumann

      MOSAIC SOFTWARE AG
      Abteilung Basisentwicklung und Forschung
      Tel +49-2225-882-291
      Fax +49-2225-882-201
      E-mail: mne@...
    Your message has been successfully submitted and would be delivered to recipients shortly.